0

I use Android Universal Image Loader, and that is great library. But sometimes, when i open my app, images couldn't be loaded. I have to scroll down and then up to load images. What must i do to overcome this problem?

UIL version : 1.8.6

Android version tested on : 4.1.2 (Galaxy S3)

My configuration

config = new ImageLoaderConfiguration.Builder(
            mContext).memoryCacheSize(Constants.MEM_CACHE_SIZE)
            .discCacheSize(Constants.DISC_CACHE_SIZE)
            .memoryCache(new WeakMemoryCache()).build();

Display options

options = new DisplayImageOptions.Builder()
            .showStubImage(R.drawable.empty_video)
            .showImageForEmptyUri(R.drawable.empty_video)
            .showImageOnFail(R.drawable.empty_video).cacheInMemory(true)
            .bitmapConfig(Bitmap.Config.RGB_565)
            .delayBeforeLoading(500)
            .displayer(new FadeInBitmapDisplayer(500))
            .imageScaleType(ImageScaleType.IN_SAMPLE_INT).cacheOnDisc(true)
            .build();

1 Answers1

0

Try to add following in your ImageLoaderConfiguration:

.tasksProcessingOrder(QueueProcessingType.FIFO)
Shamim Ahmmed
  • 8,265
  • 6
  • 25
  • 36