当前位置: 首页>>代码示例>>Java>>正文


Java Stetho.initialize方法代码示例

本文整理汇总了Java中com.facebook.stetho.Stetho.initialize方法的典型用法代码示例。如果您正苦于以下问题:Java Stetho.initialize方法的具体用法?Java Stetho.initialize怎么用?Java Stetho.initialize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.facebook.stetho.Stetho的用法示例。


在下文中一共展示了Stetho.initialize方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreate

import com.facebook.stetho.Stetho; //导入方法依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    Realm.init(this);

    RealmConfiguration config = new RealmConfiguration.Builder()
            .name("todo.realm")
            .schemaVersion(1)
            .deleteRealmIfMigrationNeeded()
            .build();

    Realm.setDefaultConfiguration(config);

    if (BuildConfig.DEBUG) {
        Stetho.initialize(
                Stetho.newInitializerBuilder(this)
                        .enableDumpapp(Stetho.defaultDumperPluginsProvider(this))
                        .enableWebKitInspector(RealmInspectorModulesProvider.builder(this).build())
                        .build());
    }
}
 
开发者ID:mengdd,项目名称:TodoRealm,代码行数:22,代码来源:TodoApplication.java

示例2: onCreate

import com.facebook.stetho.Stetho; //导入方法依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();

    Realm.init(this);
    Stetho.initialize(Stetho.newInitializerBuilder(this)
        .enableDumpapp(Stetho.defaultDumperPluginsProvider(this))
        .enableWebKitInspector(
            new StethoRealmInspectorModulesProvider.Builder(this).dirs(getFilesDir(),
                new File(getFilesDir(), "custom")).build())
        .build());

    populateRealm();
    populateRealm2();
    populateRealmIgnored();
}
 
开发者ID:xizzhu,项目名称:stetho-realm,代码行数:17,代码来源:App.java

示例3: onCreate

import com.facebook.stetho.Stetho; //导入方法依赖的package包/类
@Override
public void onCreate() {
  super.onCreate();

  historian = Historian.builder(this)
      .build();
  historian.initialize();

  Timber.plant(new Timber.DebugTree());
  Timber.plant(HistorianTree.with(historian));

  Timber.d(historian.dbPath());

  Stetho.initialize(Stetho.newInitializerBuilder(this)
      .enableDumpapp(Stetho.defaultDumperPluginsProvider(this))
      .enableWebKitInspector(new HistorianInspectorModulesProvider(this, historian))
      .build());
}
 
开发者ID:yshrsmz,项目名称:historian,代码行数:19,代码来源:App.java

示例4: onCreate

import com.facebook.stetho.Stetho; //导入方法依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    Fabric.with(this, new Crashlytics());

    if (BuildConfig.DEBUG) {
        StrictMode.enableDefaults();

        Stetho.initialize(Stetho.newInitializerBuilder(this)
                .enableDumpapp(Stetho.defaultDumperPluginsProvider(this))
                .enableWebKitInspector(RealmInspectorModulesProvider.builder(this).build())
                .build());
    }

    Realm.init(this);
}
 
开发者ID:adithya321,项目名称:Instincts-2k17,代码行数:17,代码来源:InstinctsApplication.java

示例5: onCreate

import com.facebook.stetho.Stetho; //导入方法依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();

    if (LeakCanary.isInAnalyzerProcess(this)) {
        // This process is dedicated to LeakCanary for heap analysis.
        // You should not init your app in this process.
        return;
    }

    // DON'T enable leak detection in instrumentation tests
    if (! isRunningEspressoTest()) {
        // auto-detect Activity memory leaks!
        LeakCanary.install(this);
    }

    Stetho.initialize(Stetho.newInitializerBuilder(this)
            .enableWebKitInspector(RealmInspectorModulesProvider.builder(this).build())
            .build());
}
 
开发者ID:TryGhost,项目名称:Ghost-Android,代码行数:21,代码来源:DebugSpectreApplication.java

示例6: onCreate

import com.facebook.stetho.Stetho; //导入方法依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();

    final AppStateReducer vanillaReducer = AppStateReducer.builder()
            .notesReducer(NotesListReducer.create())
            .filterReducer(NotesFilterReducer.create())
            .build();
    store = Store.create(
            new SetStateReducer<>(
                    new UndoableReducer<>(vanillaReducer)));

    Stetho.initialize(Stetho.newInitializerBuilder(this)
            .enableWebKitInspector(() -> new Stetho.DefaultInspectorModulesBuilder(ReductorApp.this)
                    .runtimeRepl(createRuntimeRepl())
                    .finish())
            .build());

}
 
开发者ID:Yarikx,项目名称:reductor,代码行数:20,代码来源:ReductorApp.java

示例7: init

import com.facebook.stetho.Stetho; //导入方法依赖的package包/类
private void init() {
    // 初始化主题切换
    ThemeUtils.setSwitchColor(this);
    //初始化Leak内存泄露检测工具
    LeakCanary.install(this);
    //初始化Stetho调试工具
    Stetho.initialize(
            Stetho.newInitializerBuilder(this)
                    .enableDumpapp(Stetho.defaultDumperPluginsProvider(this))
                    .enableWebKitInspector(Stetho.defaultInspectorModulesProvider(this))
                    .build());
}
 
开发者ID:WeDevelopTeam,项目名称:HeroVideo-master,代码行数:13,代码来源:HeroVideoApp.java

示例8: onCreate

import com.facebook.stetho.Stetho; //导入方法依赖的package包/类
@Override
public void onCreate() {
  super.onCreate();
  final Context context = this;
  Stetho.initialize(Stetho.newInitializerBuilder(context)
      .enableDumpapp(new DumperPluginsProvider() {
        @Override
        public Iterable<DumperPlugin> get() {
          return new Stetho.DefaultDumperPluginsBuilder(context)
              .provide(new FrescoStethoPlugin())
              .finish();
        }
      })
      .build());
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:16,代码来源:ComparisonApp.java

示例9: onCreate

import com.facebook.stetho.Stetho; //导入方法依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    initTimber();
    SoLoader.init(this, false);
    Stetho.initialize(
            Stetho.newInitializerBuilder(this)
                    .enableWebKitInspector(new LithoWebKitInspector(this))
                    .build());
    Fresco.initialize(this);

    appComponent = makeAppComponent();
}
 
开发者ID:dbof10,项目名称:redux-observable,代码行数:14,代码来源:App.java

示例10: onCreate

import com.facebook.stetho.Stetho; //导入方法依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();

    Realm.init(this);
    RealmConfiguration config = new RealmConfiguration.Builder().deleteRealmIfMigrationNeeded().build();
    Realm.setDefaultConfiguration(config);

    if (LeakCanary.isInAnalyzerProcess(this)) {
        // This process is dedicated to LeakCanary for heap analysis.
        // You should not init your app in this process.
        return;
    }

    LeakCanary.install(this);
    app  = this;
    if(BuildConfig.DEBUG) {
        Timber.plant(new Timber.DebugTree());
        Stetho.initialize(
                Stetho.newInitializerBuilder(this)
                        .enableDumpapp(Stetho.defaultDumperPluginsProvider(this))
                        .enableWebKitInspector(RealmInspectorModulesProvider.builder(this).build())
                        .build());
    }

    Timber.i("Creating Application");
}
 
开发者ID:prakh25,项目名称:MovieApp,代码行数:28,代码来源:MovieApp.java

示例11: init

import com.facebook.stetho.Stetho; //导入方法依赖的package包/类
private void init() {
  // 初始化主题切换
  ThemeUtils.setSwitchColor(this);
  //初始化Leak内存泄露检测工具
  LeakCanary.install(this);
  //初始化Stetho调试工具
  Stetho.initialize(
      Stetho.newInitializerBuilder(this)
          .enableDumpapp(Stetho.defaultDumperPluginsProvider(this))
          .enableWebKitInspector(Stetho.defaultInspectorModulesProvider(this))
          .build());
}
 
开发者ID:MUFCRyan,项目名称:BilibiliClient,代码行数:13,代码来源:BilibiliApp.java

示例12: init

import com.facebook.stetho.Stetho; //导入方法依赖的package包/类
private void init() {
    ThemeUtils.setSwitchColor(this); // 初始化主题切换
    LeakCanary.install(this);
    Stetho.initialize(Stetho.newInitializerBuilder(this)
                    .enableDumpapp(Stetho.defaultDumperPluginsProvider(this))
                    .enableWebKitInspector(Stetho.defaultInspectorModulesProvider(this))
                    .build());
}
 
开发者ID:MUFCRyan,项目名称:BilibiliClient,代码行数:9,代码来源:BilibiliApp.java

示例13: onCreate

import com.facebook.stetho.Stetho; //导入方法依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();

    Stetho.initialize(Stetho.newInitializerBuilder(this)
            .enableDumpapp(() -> new Stetho.DefaultDumperPluginsBuilder(this)
                    .provide(new FilesDumperPlugin(this))
                    .finish())
            .enableWebKitInspector(Stetho.defaultInspectorModulesProvider(this))
            .build());

}
 
开发者ID:smartmobilefactory,项目名称:EpubReaderAndroid,代码行数:13,代码来源:EpubSampleApp.java

示例14: install

import com.facebook.stetho.Stetho; //导入方法依赖的package包/类
static void install(Application application, File dataPath){
     // debugging tool
     Stetho.initialize(
             Stetho.newInitializerBuilder(application)
                     .enableDumpapp(Stetho.defaultDumperPluginsProvider(application))
                     .enableWebKitInspector(RealmInspectorModulesProvider
                             .builder(application)
                             .withFolder(dataPath)
                             .withMetaTables()
                             .withLimit(1000000)
                             .databaseNamePattern(Pattern.compile(".+\\.realm"))
                             .build())
                     .build());
}
 
开发者ID:DorianScholz,项目名称:OpenLibre,代码行数:15,代码来源:StethoUtils.java

示例15: install

import com.facebook.stetho.Stetho; //导入方法依赖的package包/类
public static void install(Application application) {
    Stetho.initialize(
            Stetho.newInitializerBuilder(application)
                    .enableDumpapp(Stetho.defaultDumperPluginsProvider(application))
                    .enableWebKitInspector(RealmInspectorModulesProvider.builder(application).build())
                    .build());
}
 
开发者ID:gbl08ma,项目名称:underlx,代码行数:8,代码来源:StethoUtils.java


注:本文中的com.facebook.stetho.Stetho.initialize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。