Search in sources :

Example 1 with BitmapDisplayer

use of com.nostra13.universalimageloader.core.display.BitmapDisplayer in project Wallpaper-Manager by Bencodes.

the class HomeActivity method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    super.getSupportFragmentManager().addOnBackStackChangedListener(this);
    super.setContentView(R.layout.activity_home);
    this.loadData(savedInstanceState);
    if (savedInstanceState == null) {
        BitmapDisplayer displayer = getResources().getBoolean(R.bool.config_enable_image_fade_in) ? new FadeInBitmapDisplayer(getResources().getInteger(R.integer.config_fade_in_time)) : new SimpleBitmapDisplayer();
        final DisplayImageOptions options = new DisplayImageOptions.Builder().displayer(displayer).cacheInMemory().cacheOnDisc().build();
        final ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(this).threadPriority(Thread.NORM_PRIORITY - 1).offOutOfMemoryHandling().tasksProcessingOrder(QueueProcessingType.FIFO).defaultDisplayImageOptions(options).build();
        mImageLoader = ImageLoader.getInstance();
        mImageLoader.init(config);
    }
}
Also used : FadeInBitmapDisplayer(com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer) BitmapDisplayer(com.nostra13.universalimageloader.core.display.BitmapDisplayer) SimpleBitmapDisplayer(com.nostra13.universalimageloader.core.display.SimpleBitmapDisplayer) FadeInBitmapDisplayer(com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer) SimpleBitmapDisplayer(com.nostra13.universalimageloader.core.display.SimpleBitmapDisplayer) ImageLoaderConfiguration(com.nostra13.universalimageloader.core.ImageLoaderConfiguration) DisplayImageOptions(com.nostra13.universalimageloader.core.DisplayImageOptions)

Aggregations

DisplayImageOptions (com.nostra13.universalimageloader.core.DisplayImageOptions)1 ImageLoaderConfiguration (com.nostra13.universalimageloader.core.ImageLoaderConfiguration)1 BitmapDisplayer (com.nostra13.universalimageloader.core.display.BitmapDisplayer)1 FadeInBitmapDisplayer (com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer)1 SimpleBitmapDisplayer (com.nostra13.universalimageloader.core.display.SimpleBitmapDisplayer)1