First of all your configuration:
ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(context)
.threadPoolSize(3) // equal to default value
.threadPriority(Thread.NORM_PRIORITY - 1) // equal to default value
.memoryCache(new WeakMemoryCache())
.denyCacheImageMultipleSizesInMemory()
.offOutOfMemoryHandling()
.discCacheExtraOptions(720, 480, CompressFormat.JPEG, 75)
.discCache(new UnlimitedDiscCache(cacheDir)) // You can pass your own disc cache implementation
.discCacheFileNameGenerator(new HashCodeFileNameGenerator()) // equal to default value
.imageDownloader(new URLConnectionImageDownloader(120 * 1000, 120 * 1000)) // connectTimeout (5 s), readTimeout (20 s)
.defaultDisplayImageOptions(DisplayImageOptions.createSimple()) // equal to default value
.enableLogging()
.build();
is equal to
ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(context)
.memoryCache(new WeakMemoryCache())
.denyCacheImageMultipleSizesInMemory()
.offOutOfMemoryHandling()
.discCacheExtraOptions(720, 480, CompressFormat.JPEG, 75)
.discCache(new UnlimitedDiscCache(cacheDir))
.imageDownloader(new URLConnectionImageDownloader(120 * 1000, 120 * 1000))
.enableLogging()
.build();
DON'T COPY CONFIGURATION FROM README!
Why did you off OutOfMemory handling? If you do this then you should process OOM errors yourself in ImageLoadingListener.onLoadingFailed(FailReason.OUT_OF_MEMORY)
.
My suggestions for you:
- delete
.offOutOfMemoryHandling()
options in configuration - delete
.discCacheExtraOptions(720, 480, CompressFormat.JPEG, 75)
options in configuration - use
.imageScaleType(ImageScaleType.IN_SAMPLE_INT)
in display options - do you really need RoundedBitmapDisplayer? See docs for it, it creates additional bitmap in memory during rounding. Avoid using it if you can.