Search in sources :

Example 1 with ImagePipelineConfig

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();
}
Also used : ImagePipelineConfig(com.facebook.imagepipeline.core.ImagePipelineConfig) DraweeConfig(com.facebook.drawee.backends.pipeline.DraweeConfig)

Example 2 with ImagePipelineConfig

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);
}
Also used : RequestListener(com.facebook.imagepipeline.listener.RequestListener) ImagePipelineConfig(com.facebook.imagepipeline.core.ImagePipelineConfig) RequestLoggingListener(com.facebook.imagepipeline.listener.RequestLoggingListener) HashSet(java.util.HashSet)

Example 3 with ImagePipelineConfig

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());
}
Also used : RequestListener(com.facebook.imagepipeline.listener.RequestListener) ShowcaseMediaIdExtractor(com.facebook.fresco.samples.showcase.imagepipeline.ShowcaseMediaIdExtractor) ImagePipelineConfig(com.facebook.imagepipeline.core.ImagePipelineConfig) RequestLoggingListener(com.facebook.imagepipeline.listener.RequestLoggingListener) Supplier(com.facebook.common.internal.Supplier) DraweeConfig(com.facebook.drawee.backends.pipeline.DraweeConfig) HashSet(java.util.HashSet)

Example 4 with ImagePipelineConfig

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);
}
Also used : RequestListener(com.facebook.imagepipeline.listener.RequestListener) ImagePipelineConfig(com.facebook.imagepipeline.core.ImagePipelineConfig) RequestLoggingListener(com.facebook.imagepipeline.listener.RequestLoggingListener) HashSet(java.util.HashSet)

Example 5 with ImagePipelineConfig

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);
}
Also used : RequestListener(com.facebook.imagepipeline.listener.RequestListener) ImagePipelineConfig(com.facebook.imagepipeline.core.ImagePipelineConfig) RequestLoggingListener(com.facebook.imagepipeline.listener.RequestLoggingListener) HashSet(java.util.HashSet)

Aggregations

ImagePipelineConfig (com.facebook.imagepipeline.core.ImagePipelineConfig)24 RequestListener (com.facebook.imagepipeline.listener.RequestListener)9 RequestLoggingListener (com.facebook.imagepipeline.listener.RequestLoggingListener)9 HashSet (java.util.HashSet)9 DiskCacheConfig (com.facebook.cache.disk.DiskCacheConfig)7 Supplier (com.facebook.common.internal.Supplier)5 MemoryCacheParams (com.facebook.imagepipeline.cache.MemoryCacheParams)5 DraweeConfig (com.facebook.drawee.backends.pipeline.DraweeConfig)3 File (java.io.File)3 AlarmManager (android.app.AlarmManager)1 PendingIntent (android.app.PendingIntent)1 Intent (android.content.Intent)1 IntentFilter (android.content.IntentFilter)1 SharedPreferences (android.content.SharedPreferences)1 Crashlytics (com.crashlytics.android.Crashlytics)1 ShowcaseMediaIdExtractor (com.facebook.fresco.samples.showcase.imagepipeline.ShowcaseMediaIdExtractor)1 StethoInterceptor (com.facebook.stetho.okhttp3.StethoInterceptor)1 Flickr (com.flickr4java.flickr.Flickr)1 REST (com.flickr4java.flickr.REST)1 AndroidMessenger (im.actor.core.AndroidMessenger)1