當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。