I'm using universal image loader version 1.5.9 , this is my code, I want to cache the images to not download every time I reload the activity , I don't close the application but it downloads the image every time :
ImageLoader imageLoader = ImageLoader.getInstance();
File cacheDir = StorageUtils.getCacheDirectory(context);
config= new ImageLoaderConfiguration.Builder(context)
.memoryCacheExtraOptions(480, 800) // default = device screen dimensions
.diskCacheExtraOptions(480, 800, null)
.threadPriority(Thread.NORM_PRIORITY - 2) // default
.tasksProcessingOrder(QueueProcessingType.FIFO) // default
.diskCache(new UnlimitedDiskCache(cacheDir)) // default
.diskCacheSize(50 * 1024 * 1024)
.diskCacheFileCount(100)
.diskCacheFileNameGenerator(new HashCodeFileNameGenerator()) // default
.imageDownloader(new BaseImageDownloader(context)) // default
.build();
imageLoader.init(config);
imageLoader.displayImage(img, viewHolder.img);
What is the problem ? why does it download the image every time ?