Universal Image Loader: Can I use cache but also refresh it?

后端 未结 3 433
眼角桃花
眼角桃花 2020-12-16 04:20

I\'m loading dynamically generated images so I always want them to be up to date. But they take time to load so I also want to display a cached version while the updated one

3条回答
  •  情深已故
    2020-12-16 05:00

    private lateinit var options: DisplayImageOptions
    
    options = DisplayImageOptions.Builder()
    
                    .considerExifParams(true)
                    .bitmapConfig(Bitmap.Config.RGB_565)
                    .cacheOnDisk(true)
                    .cacheInMemory(true)
                    .build()   
    
    ImageLoader.getInstance().displayImage(Model.img_url, itemView.ivPlayer, options)
    

提交回复
热议问题