本文整理汇总了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());
}
}
示例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();
}
示例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());
}
示例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);
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例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();
}
示例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");
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}