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);
}
}
Aggregations