本文整理汇总了Java中com.facebook.stetho.Stetho.initializeWithDefaults方法的典型用法代码示例。如果您正苦于以下问题:Java Stetho.initializeWithDefaults方法的具体用法?Java Stetho.initializeWithDefaults怎么用?Java Stetho.initializeWithDefaults使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.facebook.stetho.Stetho
的用法示例。
在下文中一共展示了Stetho.initializeWithDefaults方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.facebook.stetho.Stetho; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
initializeDependencies();
if (BuildConfig.DEBUG) {
Timber.plant(new Timber.DebugTree());
Stetho.initializeWithDefaults(this);
}
if (LeakCanary.isInAnalyzerProcess(this)) {
return;
}
LeakCanary.install(this);
}
示例2: onCreate
import com.facebook.stetho.Stetho; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
if (BuildConfig.DEBUG){
Stetho.initializeWithDefaults(this);
}
ApiRESTful apiRESTful = ApiRESTful.getApiRESTful(this, false);
apiRESTful.setModelUrl(AppConfig.HOST);
apiRESTful.setPushWs("");
apiRESTful.setAutoToWs(false);
apiRESTful.setCardId("04df-ee031b69-0000-4e02-8a56-41736fc1226a-e0000000");
apiRESTful.setHeadersPrefix("x-hz-");
OkHttpClient.Builder builder = new OkHttpClient.Builder();
builder.addNetworkInterceptor(new StethoInterceptor());
//apiRESTful.setOKHttpClientBuider(builder);
ALog.debug = true;
}
示例3: onCreate
import com.facebook.stetho.Stetho; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
singleton = this;
TwitterAuthConfig authConfig = new TwitterAuthConfig(TWITTER_KEY, TWITTER_SECRET);
Fabric.with(this, new Twitter(authConfig));
Stetho.initializeWithDefaults(this);
}
示例4: initLibs
import com.facebook.stetho.Stetho; //导入方法依赖的package包/类
private void initLibs() {
// Initialize dagger
DaggerManager.getInstance().buildComponentAndInject(this);
//@formatter:off
// Initialize typeface helper
TypefaceCollection typeface = new TypefaceCollection.Builder()
.set(Typeface.NORMAL, Typeface.createFromAsset(getAssets(), "fonts/Roboto-Light.ttf"))
.set(Typeface.BOLD, Typeface.createFromAsset(getAssets(), "fonts/Roboto-Medium.ttf"))
.create();
TypefaceHelper.init(typeface);
//@formatter:on
if (BuildConfig.DEBUG) {
// Facebook Stetho
Stetho.initializeWithDefaults(this);
}
}
开发者ID:beczesz,项目名称:FragmentNavigationPatternDemo,代码行数:20,代码来源:FragmentNavigationDemoApplication.java
示例5: registerComponents
import com.facebook.stetho.Stetho; //导入方法依赖的package包/类
@Override public void registerComponents(Context context, Glide glide) {
Stetho.initializeWithDefaults(context);
final Cache cache = new Cache(new File(context.getCacheDir(), "okhttp"), IMAGE_CACHE_SIZE);
HttpLoggingInterceptor logger = new HttpLoggingInterceptor();
// logger.setLevel(Level.BASIC);
OkHttpClient client = new OkHttpClient()
.newBuilder()
.cache(cache)
.addNetworkInterceptor(new StethoInterceptor())
.addInterceptor(logger)
.build();
glide.register(CachedGlideUrl.class, InputStream.class,
superFactory(new OkHttpUrlLoader.Factory(client), CachedGlideUrl.class));
glide.register(ForceLoadGlideUrl.class, InputStream.class,
superFactory(new OkHttpUrlLoader.Factory(client), ForceLoadGlideUrl.class));
}
示例6: onCreate
import com.facebook.stetho.Stetho; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
if (!isUnitTest()) {
if (LeakCanary.isInAnalyzerProcess(this)) {
return;
}
LeakCanary.install(this);
Stetho.initializeWithDefaults(this);
Timber.plant(new Timber.DebugTree());
}
injector = buildAppComponent();
}
示例7: onCreate
import com.facebook.stetho.Stetho; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
Fabric.with(this, new Crashlytics());
LeakCanary.install(this);
AndroidThreeTen.init(this);
Stetho.initializeWithDefaults(this);
installTimber();
this.registerApplicationComponent();
this.registerApiKeyComponent();
this.registerNetworkComponent();
this.registerDashboardComponent();
CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
.setDefaultFontPath("fonts/Lato-Regular.ttf")
.setFontAttrId(R.attr.fontPath)
.build()
);
}
示例8: onCreate
import com.facebook.stetho.Stetho; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Stetho.initializeWithDefaults(this);
setContentView(R.layout.activity_main);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
startActivity(new Intent(MainActivity.this, InsertTaskActivity.class));
}
});
}
示例9: onCreate
import com.facebook.stetho.Stetho; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
NyrisEndpoints.DEBUG = BuildConfig.DEBUG;
Stetho.initializeWithDefaults(this);
Nyris.getInstance()
.init(this, BuildConfig.CLIENT_ID)
//You can add your own output format
/*.setOutputformat("YOUR_OUTPUT_FORMAT")*/;
}
示例10: onCreate
import com.facebook.stetho.Stetho; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
instance = this;
Stetho.initializeWithDefaults(this);
new OkHttpClient.Builder()
.addNetworkInterceptor(new StethoInterceptor())
.build();
//setDummyData();
clearDummyData();
ServiceGenerator.setup();
Log.i("Setup" , "Complete");
}
示例11: onCreate
import com.facebook.stetho.Stetho; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
DI.getDI().init(this);
if (BuildConfig.DEBUG) {
Stetho.initializeWithDefaults(this);
}
}
示例12: init
import com.facebook.stetho.Stetho; //导入方法依赖的package包/类
private void init() {
Router.initialize(this);
Stetho.initializeWithDefaults(this);
Logger.init(TAG) // default PRETTYLOGGER or use just init()
.methodCount(1) // default 2
.hideThreadInfo() // default shown
.logLevel(LogLevel.FULL) // default LogLevel.FULL
.methodOffset(2); // default 0
FIR.init(this);
// 初始化参数依次为 this, AppId, AppKey
AVOSCloud.initialize(this, Constants.AVOSCloud.APP_ID, Constants.AVOSCloud.APP_KEY);
AVAnalytics.enableCrashReport(this, true);
}
示例13: onCreate
import com.facebook.stetho.Stetho; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
Stetho.initializeWithDefaults(this);
AndroidNoSql.initWith(
new PaperDataSaver(this),
//new SharedPreferencesDataSaver(getSharedPreferences("test", Context.MODE_PRIVATE)),
new LogDataSaver("LogDataSaver")
);
}
示例14: Initializer
import com.facebook.stetho.Stetho; //导入方法依赖的package包/类
Initializer() {
return context -> {
Stetho.initializeWithDefaults(context);
Timber.plant(new Timber.DebugTree());
Timber.plant(new StethoTree());
};
}
示例15: onCreate
import com.facebook.stetho.Stetho; //导入方法依赖的package包/类
public void onCreate() {
super.onCreate();
CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
.setDefaultFontPath("fonts/Montserrat-Regular.ttf")
.setFontAttrId(R.attr.fontPath)
.build()
);
Stetho.initializeWithDefaults(this);
}