本文整理汇总了Java中com.facebook.stetho.DumperPluginsProvider类的典型用法代码示例。如果您正苦于以下问题:Java DumperPluginsProvider类的具体用法?Java DumperPluginsProvider怎么用?Java DumperPluginsProvider使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DumperPluginsProvider类属于com.facebook.stetho包,在下文中一共展示了DumperPluginsProvider类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.facebook.stetho.DumperPluginsProvider; //导入依赖的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());
}
示例2: onCreate
import com.facebook.stetho.DumperPluginsProvider; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
INSTANCE = this;
final Context mContext = this;
DBUtils.getInstance().initDB(getApplicationContext());
Stetho.initialize(Stetho.newInitializerBuilder(mContext)
.enableDumpapp(new DumperPluginsProvider() {
@Override
public Iterable<DumperPlugin> get() {
return new Stetho.DefaultDumperPluginsBuilder(mContext)
.provide(new HprofDumperPlugin(mContext))
.finish();
}
})
.enableWebKitInspector(Stetho.defaultInspectorModulesProvider(mContext))
.build());
Stetho.initializeWithDefaults(mContext);
HttpsUtils.SSLParams sslParams = HttpsUtils.getSslSocketFactory(null, null, null);
OkHttpClient okHttpClient = new OkHttpClient.Builder()
// .addInterceptor(new LoggerInterceptor("TAG"))
.connectTimeout(10000L, TimeUnit.MILLISECONDS)
.sslSocketFactory(sslParams.sSLSocketFactory, sslParams.trustManager)
.readTimeout(10000L, TimeUnit.MILLISECONDS)
//其他配置
.build();
OkHttpUtils.initClient(okHttpClient);
}
示例3: initializeStetho
import com.facebook.stetho.DumperPluginsProvider; //导入依赖的package包/类
private void initializeStetho(final Context context) {
// See also: Stetho.initializeWithDefaults(Context)
Stetho.initialize(Stetho.newInitializerBuilder(context)
.enableDumpapp(new DumperPluginsProvider() {
@Override
public Iterable<DumperPlugin> get() {
return new Stetho.DefaultDumperPluginsBuilder(context)
.provide(new HelloWorldDumperPlugin())
.provide(new APODDumperPlugin(context.getContentResolver()))
.finish();
}
})
.enableWebKitInspector(new ExtInspectorModulesProvider(context))
.build());
}
示例4: onCreate
import com.facebook.stetho.DumperPluginsProvider; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
FLog.setMinimumLoggingLevel(FLog.VERBOSE);
Set<RequestListener> listeners = new HashSet<>();
listeners.add(new RequestLoggingListener());
OkHttpClient okHttpClient = new OkHttpClient.Builder()
.addNetworkInterceptor(new StethoInterceptor())
.build();
ImagePipelineConfig imagePipelineConfig =
OkHttpImagePipelineConfigFactory.newBuilder(this, okHttpClient)
.setRequestListeners(listeners)
.setProgressiveJpegConfig(new SimpleProgressiveJpegConfig())
.setImageDecoderConfig(CustomImageFormatConfigurator.createImageDecoderConfig(this))
.experiment()
.setMediaVariationsIndexEnabled(
new Supplier<Boolean>() {
@Override
public Boolean get() {
return true;
}
})
.experiment()
.setBitmapPrepareToDraw(true, 0, Integer.MAX_VALUE, true)
.experiment()
.setSmartResizingEnabled(Suppliers.BOOLEAN_TRUE)
.build();
ImagePipelineConfig.getDefaultImageRequestConfig().setProgressiveRenderingEnabled(true);
DraweeConfig.Builder draweeConfigBuilder = DraweeConfig.newBuilder();
CustomImageFormatConfigurator.addCustomDrawableFactories(this, draweeConfigBuilder);
draweeConfigBuilder.setDebugOverlayEnabledSupplier(
DebugOverlaySupplierSingleton.getInstance(getApplicationContext()));
Fresco.initialize(this, imagePipelineConfig, draweeConfigBuilder.build());
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();
}
})
.enableWebKitInspector(Stetho.defaultInspectorModulesProvider(context))
.build());
}