本文整理汇总了Java中com.facebook.stetho.Stetho类的典型用法代码示例。如果您正苦于以下问题:Java Stetho类的具体用法?Java Stetho怎么用?Java Stetho使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Stetho类属于com.facebook.stetho包,在下文中一共展示了Stetho类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.facebook.stetho.Stetho; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
Log.d(TAG, "onCreate start");
if (BuildConfig.DEBUG) {
StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder().detectAll().penaltyLog().build());
StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder().detectAll().penaltyLog().build());
}
applicationComponent = DaggerApplicationComponent.builder()
.applicationModule(new ApplicationModule(this))
.build();
// Fabric.with(this, new Crashlytics());
Stetho.initializeWithDefaults(this.getApplicationContext());
weatherApplicationInstance = this;
//初始化ApiClient
ApiConfiguration apiConfiguration = ApiConfiguration.builder()
.dataSourceType(ApiConstants.WEATHER_DATA_SOURCE_TYPE_KNOW)
.build();
ApiClient.init(apiConfiguration);
Log.d(TAG, "onCreate end");
}
示例2: 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());
}
}
示例3: 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;
}
LeakCanary.install(this);
Stetho.initializeWithDefaults(this);
if(BuildConfig.DEBUG) {
Timber.plant(new Timber.DebugTree());
Timber.plant(new StethoTree());
}
component = DaggerApplicationComponent.builder()
.applicationModule(new ApplicationModule(this))
.build();
component.inject(this);
}
示例4: 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();
}
示例5: 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);
}
示例6: get
import com.facebook.stetho.Stetho; //导入依赖的package包/类
@Override
public Iterable<ChromeDevtoolsDomain> get() {
return new Stetho.DefaultInspectorModulesBuilder(context)
.provideDatabaseDriver(new SqliteDatabaseDriver(context,
new DatabaseFilesProvider() {
@Override
public List<File> getDatabaseFiles() {
List<File> list = new ArrayList<>();
list.add(new File(historian.dbPath()));
return list;
}
}, new DatabaseConnectionProvider() {
@Override
public SQLiteDatabase openDatabase(File file) throws SQLiteException {
return historian.getDatabase();
}
}))
.finish();
}
示例7: 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());
}
示例8: 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);
}
示例9: onCreate
import com.facebook.stetho.Stetho; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
TallyStackerApplication.instance = this;
JodaTimeAndroid.init(this);
Fabric.with(this, new Crashlytics());
Fabric.with(this, new Answers());
Stetho.initializeWithDefaults(this);
// Setup handler for uncaught exceptions.
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
@Override
public void uncaughtException(Thread thread, Throwable e) {
if (!(e instanceof ExpectedElementNotFound))
handleUncaughtException(e);
}
});
}
示例10: 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());
}
示例11: onCreate
import com.facebook.stetho.Stetho; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
Fabric.with(this, new Crashlytics());
Prefs.initPrefs(this);
if (BuildConfig.DEBUG) {
Stetho.initializeWithDefaults(this);
}
FirebaseAnalytics analytics = FirebaseAnalytics.getInstance(this);
_myComponent = DaggerMyComponent.builder()
.myModule(new MyModule(this, analytics))
.build();
}
示例12: onCreate
import com.facebook.stetho.Stetho; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
createAppComponent();
DaggerAndroidInjector.initialize(this);
AppLogger.init();
if (BuildConfig.DEBUG) {
Timber.plant(new Timber.DebugTree());
Stetho.initializeWithDefaults(this);
}
if (!LeakCanary.isInAnalyzerProcess(this)) {
LeakCanary.install(this);
}
CalligraphyConfig.initDefault(mCalligraphyConfig);
}
示例13: 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;
}
示例14: 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);
}
示例15: 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