2

How to avoid flickering of imageview while using glide and calling notifyDataSetChanged on adapter.

Every time on pull down refresh all the images will flicker.

Glide.(context).load(attachment.get(2).getImageLoadingUrl()).override(destWidth,destheight)
        .placeholder(R.drawable.imageplaceholder) 
        .fallback( R.drawable.noimage )
        .error(R.drawable.noimage)        .transition(DrawableTransitionOptions.withCrossFade())
        .skipMemoryCache(true).diskCacheStrategy(DiskCacheStrategy.RESOURCE)
         .into(iv) ;
Zoe
  • 27,060
  • 21
  • 118
  • 148
stack Learner
  • 1,318
  • 3
  • 18
  • 35

1 Answers1

1

Use setHasStableIds(true); in your adapter and properly override getItemId() method.
See link how to do it

t0m
  • 3,004
  • 31
  • 53