Search in sources :

Example 21 with ImagePipelineConfig

use of com.facebook.imagepipeline.core.ImagePipelineConfig in project SherlockAdapter by EvilBT.

the class MainApplication method onCreate.

@Override
public void onCreate() {
    super.onCreate();
    ImagePipelineConfig config = ImagePipelineConfig.newBuilder(this).setDownsampleEnabled(true).build();
    Fresco.initialize(this, config);
}
Also used : ImagePipelineConfig(com.facebook.imagepipeline.core.ImagePipelineConfig)

Example 22 with ImagePipelineConfig

use of com.facebook.imagepipeline.core.ImagePipelineConfig in project GalleryFinal by pengjianbo.

the class MainActivity method initFresco.

private void initFresco() {
    ImagePipelineConfig config = ImagePipelineConfig.newBuilder(this).setBitmapsConfig(Bitmap.Config.ARGB_8888).build();
    Fresco.initialize(this, config);
}
Also used : ImagePipelineConfig(com.facebook.imagepipeline.core.ImagePipelineConfig)

Example 23 with ImagePipelineConfig

use of com.facebook.imagepipeline.core.ImagePipelineConfig in project fresco by facebook.

the class ImagePipelineConfigFactory method getOkHttpImagePipelineConfig.

/**
 * Creates config using OkHttp as network backed.
 */
public static ImagePipelineConfig getOkHttpImagePipelineConfig(Context context) {
    if (sOkHttpImagePipelineConfig == null) {
        OkHttpClient okHttpClient = new OkHttpClient.Builder().addNetworkInterceptor(new StethoInterceptor()).build();
        ImagePipelineConfig.Builder configBuilder = OkHttpImagePipelineConfigFactory.newBuilder(context, okHttpClient);
        configureCaches(configBuilder, context);
        configureLoggingListeners(configBuilder);
        sOkHttpImagePipelineConfig = configBuilder.build();
    }
    return sOkHttpImagePipelineConfig;
}
Also used : OkHttpClient(okhttp3.OkHttpClient) ImagePipelineConfig(com.facebook.imagepipeline.core.ImagePipelineConfig) StethoInterceptor(com.facebook.stetho.okhttp3.StethoInterceptor)

Example 24 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 25 with ImagePipelineConfig

use of com.facebook.imagepipeline.core.ImagePipelineConfig in project fresco by facebook.

the class ZoomableApplication 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)25 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 SQLiteException (android.database.sqlite.SQLiteException)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