本文整理匯總了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);
}