use of com.facebook.imagepipeline.core.ImagePipelineConfig in project Rocket.Chat.Android by RocketChat.
the class RocketChatWidgets method initialize.
public static void initialize(Context context, OkHttpClient okHttpClient) {
ImagePipelineConfig config = OkHttpImagePipelineConfigFactory.newBuilder(context, okHttpClient).setDownsampleEnabled(true).setImageDecoderConfig(ImageFormatConfigurator.createImageDecoderConfig()).build();
DraweeConfig.Builder draweeConfigBuilder = DraweeConfig.newBuilder();
ImageFormatConfigurator.addCustomDrawableFactories(draweeConfigBuilder);
Fresco.initialize(context, config, draweeConfigBuilder.build());
Fresco.getImagePipeline().clearCaches();
}
use of com.facebook.imagepipeline.core.ImagePipelineConfig in project fresco by facebook.
the class AnimationApplication method onCreate.
@Override
public void onCreate() {
super.onCreate();
FLog.setMinimumLoggingLevel(FLog.VERBOSE);
Set<RequestListener> listeners = new HashSet<>();
listeners.add(new RequestLoggingListener());
ImagePipelineConfig config = ImagePipelineConfig.newBuilder(this).setRequestListeners(listeners).build();
Fresco.initialize(this, config);
}
use of com.facebook.imagepipeline.core.ImagePipelineConfig in project fresco by facebook.
the class ShowcaseApplication method onCreate.
@Override
public void onCreate() {
super.onCreate();
FLog.setMinimumLoggingLevel(FLog.VERBOSE);
Set<RequestListener> listeners = new HashSet<>();
listeners.add(new RequestLoggingListener());
ImagePipelineConfig imagePipelineConfig = ImagePipelineConfig.newBuilder(this).setRequestListeners(listeners).setImageDecoderConfig(CustomImageFormatConfigurator.createImageDecoderConfig(this)).experiment().setMediaVariationsIndexEnabled(new Supplier<Boolean>() {
@Override
public Boolean get() {
return true;
}
}).experiment().setMediaIdExtractor(new ShowcaseMediaIdExtractor()).build();
DraweeConfig.Builder draweeConfigBuilder = DraweeConfig.newBuilder();
CustomImageFormatConfigurator.addCustomDrawableFactories(this, draweeConfigBuilder);
draweeConfigBuilder.setDebugOverlayEnabledSupplier(DebugOverlaySupplierSingleton.getInstance(getApplicationContext()));
Fresco.initialize(this, imagePipelineConfig, draweeConfigBuilder.build());
}
use of com.facebook.imagepipeline.core.ImagePipelineConfig in project fresco by facebook.
the class TransitionsApplication method onCreate.
@Override
public void onCreate() {
super.onCreate();
FLog.setMinimumLoggingLevel(FLog.VERBOSE);
Set<RequestListener> listeners = new HashSet<>();
listeners.add(new RequestLoggingListener());
ImagePipelineConfig config = ImagePipelineConfig.newBuilder(this).setRequestListeners(listeners).build();
Fresco.initialize(this, config);
}
use of com.facebook.imagepipeline.core.ImagePipelineConfig in project fresco by facebook.
the class UriApplication method onCreate.
@Override
public void onCreate() {
super.onCreate();
FLog.setMinimumLoggingLevel(FLog.VERBOSE);
Set<RequestListener> listeners = new HashSet<>();
listeners.add(new RequestLoggingListener());
ImagePipelineConfig config = ImagePipelineConfig.newBuilder(this).setRequestListeners(listeners).build();
Fresco.initialize(this, config);
}
Aggregations