I am using Glide 3.7.0 with RecyclerView
. The item view always blinks when refreshing (calling notifyDataSetChanged
).
Here is my code:
Glide
.with(context)
.load(filepath)
.diskCacheStrategy(DiskCacheStrategy.NONE)
.skipMemoryCache(true)
.dontAnimate()
.into(imageview);
When I use no cache, the ImageView
has a null Bitmap when notifyDataSetChanged
method is called and Glide hasn't finished loading the bitmap.
If I use the code below:
Glide
.with(context)
.load(filepath)
.dontAnimate()
.into(imageview);
Then the item ImageView
does not blink anymore (using cache).
I want to update the item view dynamically, so I disable the glide cache.
Are there any solutions to solve this blink bug?
Thank you very much!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…