当前位置: 首页>>代码示例>>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;未经允许,请勿转载。