當前位置: 首頁>>代碼示例>>Java>>正文


Java Stetho.initializeWithDefaults方法代碼示例

本文整理匯總了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);
}
 
開發者ID:quangctkm9207,項目名稱:mvp-android-arch-component,代碼行數:17,代碼來源:AndroidApplication.java

示例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;
}
 
開發者ID:huangjingqiang,項目名稱:SWDemo,代碼行數:18,代碼來源:AGApplication.java

示例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);
}
 
開發者ID:beraldofilippo,項目名稱:TWStreaming,代碼行數:11,代碼來源:App.java

示例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));
	}
 
開發者ID:TWiStErRob,項目名稱:glide-support,代碼行數:20,代碼來源:GlideModule.java

示例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();
}
 
開發者ID:kobakei,項目名稱:Anago,代碼行數:18,代碼來源:AnagoApplication.java

示例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()
    );
}
 
開發者ID:omgitsjoao,項目名稱:wakatime-android-client,代碼行數:19,代碼來源:WakatimeApplication.java

示例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));
        }
    });
}
 
開發者ID:spygi,項目名稱:tasktrckr,代碼行數:18,代碼來源:MainActivity.java

示例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")*/;
}
 
開發者ID:nyris,項目名稱:Nyris.IMX.Android,代碼行數:11,代碼來源:DebugDemoApp.java

示例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");
}
 
開發者ID:ayounes3333,項目名稱:GSB-2017-Android,代碼行數:14,代碼來源:GSBApplication.java

示例11: onCreate

import com.facebook.stetho.Stetho; //導入方法依賴的package包/類
@Override
public void onCreate() {
    super.onCreate();
    DI.getDI().init(this);

    if (BuildConfig.DEBUG) {
        Stetho.initializeWithDefaults(this);
    }
}
 
開發者ID:VDenis,項目名稱:YandexTranslator,代碼行數:10,代碼來源:App.java

示例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);
}
 
開發者ID:betroy,項目名稱:xifan,代碼行數:16,代碼來源:App.java

示例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")
    );
}
 
開發者ID:florent37,項目名稱:Android-NoSql,代碼行數:12,代碼來源:MainApplication.java

示例14: Initializer

import com.facebook.stetho.Stetho; //導入方法依賴的package包/類
Initializer() {
  return context -> {
    Stetho.initializeWithDefaults(context);

    Timber.plant(new Timber.DebugTree());
    Timber.plant(new StethoTree());
  };
}
 
開發者ID:rogues-dev,項目名稱:superglue,代碼行數:9,代碼來源:DebugSuperGlueModule.java

示例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);
}
 
開發者ID:vixir,項目名稱:Perfect-Day,代碼行數:10,代碼來源:PerfectDayApplication.java


注:本文中的com.facebook.stetho.Stetho.initializeWithDefaults方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。