private void initStetho() { Stetho.initialize( Stetho.newInitializerBuilder(this) .enableDumpapp(Stetho.defaultDumperPluginsProvider(this)) .enableWebKitInspector(Stetho.defaultInspectorModulesProvider(this)) .build()); }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ButterKnife.bind(this); // decide whether it is tablet mode if (null != detail_container) { mTwoPane = true; // Make sure that we are not being restored from a previous state, // else we could end up with overlapping fragments. if (savedInstanceState == null) { getSupportFragmentManager() .beginTransaction() .add(R.id.detail_container, new DetailFragment(), DetailFragmentTag) .commit(); } } else { mTwoPane = false; } // Initialize Stetho Stetho.initialize( Stetho.newInitializerBuilder(this) .enableDumpapp(Stetho.defaultDumperPluginsProvider(this)) .enableWebKitInspector(Stetho.defaultInspectorModulesProvider(this)) .build()); }
@Override public void onCreate() { StrictModeUtil.init(); super.onCreate(); refWatcher = LeakCanary.install(this); mContext = this; ImageLoadProxy.initImageLoader(this); JUtils.initialize(this); new Thread( new Runnable() { @Override public void run() { mAllArea = AreaArrayDataHelper.getAll(mContext); } }) .start(); if (BuildConfig.DEBUG) { Logger.init().hideThreadInfo().setMethodCount(1).setLogLevel(LogLevel.FULL); } Stetho.initializeWithDefaults(this); Stetho.initialize( Stetho.newInitializerBuilder(this) .enableDumpapp(Stetho.defaultDumperPluginsProvider(this)) .enableWebKitInspector(Stetho.defaultInspectorModulesProvider(this)) .build()); // 全局捕获异常 MyCrashHandler handler = MyCrashHandler.getInstance(); Thread.currentThread().setUncaughtExceptionHandler(handler); }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_container); Stetho.initialize( Stetho.newInitializerBuilder(this) .enableDumpapp(Stetho.defaultDumperPluginsProvider(this)) .enableWebKitInspector(Stetho.defaultInspectorModulesProvider(this)) .build()); Fragment mainFragment = getSupportFragmentManager().findFragmentById(R.id.frame_container); if (mainFragment == null) getSupportFragmentManager() .beginTransaction() .add(R.id.frame_container, MovieListFragment.newInstance()) .commit(); else if (findViewById(R.id.details_container) == null) { if (mainFragment instanceof MovieDetailsFragment) getSupportFragmentManager() .beginTransaction() .replace(R.id.frame_container, MovieDetailsFragment.newInstance()) .commit(); else if (mainFragment instanceof ReviewsFragment) getSupportFragmentManager() .beginTransaction() .replace(R.id.frame_container, ReviewsFragment.newInstance(id)) .commit(); else getSupportFragmentManager() .beginTransaction() .replace(R.id.frame_container, MovieListFragment.newInstance()) .commit(); } if (findViewById(R.id.details_container) != null) { Fragment currentFragment = getSupportFragmentManager().findFragmentById(R.id.details_container); if (currentFragment == null) getSupportFragmentManager() .beginTransaction() .replace(R.id.details_container, MovieDetailsFragment.newInstance()) .commit(); else { if (currentFragment instanceof MovieDetailsFragment) getSupportFragmentManager() .beginTransaction() .replace(R.id.details_container, MovieDetailsFragment.newInstance()) .commit(); else { getSupportFragmentManager() .beginTransaction() .replace(R.id.details_container, ReviewsFragment.newInstance(id)) .commit(); } } } }
public static void init(final Context context) { if (mInitialized) return; Stetho.InitializerBuilder initBuilder = Stetho.newInitializerBuilder(context); initBuilder .enableDumpapp(Stetho.defaultDumperPluginsProvider(context)) .enableWebKitInspector(Stetho.defaultInspectorModulesProvider(context)); Stetho.initialize(initBuilder.build()); mInitialized = true; }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Stetho.initialize( Stetho.newInitializerBuilder(this) .enableDumpapp(Stetho.defaultDumperPluginsProvider(this)) .enableWebKitInspector(Stetho.defaultInspectorModulesProvider(this)) .build()); // OkHttpClient client = new OkHttpClient(); // client.networkInterceptors().add(new StethoInterceptor()); setContentView(R.layout.activity_portfolio); }
@Override public void onCreate() { super.onCreate(); // Fabric.with(this, new Crashlytics()); sContext = this; Stetho.initialize( Stetho.newInitializerBuilder(this) .enableDumpapp(Stetho.defaultDumperPluginsProvider(this)) .enableWebKitInspector(RealmInspectorModulesProvider.builder(this).build()) .build()); RealmConfiguration realmConfiguration = new RealmConfiguration.Builder(this).build(); Realm.setDefaultConfiguration(realmConfiguration); }
@Override public void onCreate() { super.onCreate(); if (BuildConfig.DEBUG) { LeakCanary.install(this); Stetho.initializeWithDefaults(this); } }
@Override public void onCreate() { super.onCreate(); if (instance == null) { instance = this; } FlowManager.init(new FlowConfig.Builder(this).build()); Stetho.initializeWithDefaults(this); }
@Override public void apply() { if (mLeakCanaryAlreadyEnabled.compareAndSet(false, true)) { mLeakCanaryProxy.init(); } if (mStethoAlreadyEnabled.compareAndSet(false, true)) { Stetho.initializeWithDefaults(mRestestApplication); mOkHttpClient.interceptors().add(new StethoInterceptor()); } }
@Override public void onCreate() { super.onCreate(); WondersSQLiteHelper wondersSQLiteHelper = WondersSQLiteHelper.getInstance(getApplicationContext()); try { wondersSQLiteHelper.configureDataBase(); } catch (IOException e) { Log.e("bError", "Erro ao configurar a conexao com o banco de dados"); } setDefaultFont(); Stetho.initialize( Stetho.newInitializerBuilder(this) .enableDumpapp(Stetho.defaultDumperPluginsProvider(this)) .enableWebKitInspector(Stetho.defaultInspectorModulesProvider(this)) .build()); }
@Override public void onCreate() { super.onCreate(); AlexandriaApplication.context = getApplicationContext(); // http://facebook.github.io/stetho/ Stetho.initializeWithDefaults(this); // https://github.com/square/leakcanary // LeakCanary.install(this); // Including Jake Wharton's Timber logging library if (BuildConfig.DEBUG) { Timber.plant(new Timber.DebugTree()); } }
@Override public void onCreate() { super.onCreate(); Stetho.initializeWithDefaults(this); }