I'm using UIL with this config to load image from FILEs:
BitmapDisplayer displayer = new FadeInBitmapDisplayer(500) {
@Override
public Bitmap display(Bitmap bitmap, ImageView imageView,
LoadedFrom loadedFrom) {
if (loadedFrom != LoadedFrom.MEMORY_CACHE) {
return super.display(bitmap, imageView, loadedFrom);
} else {
imageView.setImageBitmap(bitmap);
return bitmap;
}
}
};
DisplayImageOptions options = new DisplayImageOptions.Builder()
.cacheInMemory(true).resetViewBeforeLoading(true)
.showImageForEmptyUri(R.drawable.thumbnail_no_image)
.showImageOnFail(R.drawable.thumbnail_no_image)
.displayer(displayer).build();
ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(
context).defaultDisplayImageOptions(options)
.memoryCacheSize(2 * 1024 * 1024).build();
sLoader.init(config);
I need to implement selection in GridView
so after I consider any item selected I call notifyDataSetChanged
to make my selectionOverlay visible. And after this call all images start reloading nd this causes GridView
to blink. How can I avoid this?