Glide recyclerview loading duplicate image

后端 未结 2 1895
轻奢々
轻奢々 2021-01-23 09:56

I have a recyclerview with diffutil. Already I using Glide to load images inside the ImageViews.

on the onBindV

相关标签:
2条回答
  • 2021-01-23 10:15

    Try clearing the image before loading a new one in your loadImage method:

    view.main_image.setImageBitmap(null)
    Glide.with(...)
    
    0 讨论(0)
  • 2021-01-23 10:34

    I know its late but hope it will help someone. Override these two methods in your adapter.

      @Override
    public long getItemId(int position) {
      return position;
    }
    
      @Override
    public int getItemViewType(int position) {
     return position;
    }
    
    0 讨论(0)
提交回复
热议问题