RecyclerView blinking after notifyDatasetChanged()

前端 未结 18 1722
悲&欢浪女
悲&欢浪女 2020-12-07 16:20

I have a RecyclerView which loads some data from API, includes an image url and some data, and I use networkImageView to lazy load image.

@Override
public vo         


        
18条回答
  •  粉色の甜心
    2020-12-07 16:40

    I have the same issue loading image from some urls and then imageView blinks. Solved by using

    notifyItemRangeInserted()    
    

    instead of

    notifyDataSetChanged()
    

    which avoids to reload those unchanged old datas.

提交回复
热议问题