Recyclerview on Scrolling values changing from adapter

后端 未结 5 1918
情深已故
情深已故 2020-12-05 14:52

I am working on an app where I am trying to populate a list using RecyclerView and recycler adapter as well. But when I scroll through the list quickly sometimes values on t

5条回答
  •  春和景丽
    2020-12-05 15:26

    Just Override these methods in your adapter class:

    @Override
    public long getItemId(int position) {
        return position;
    }
    
    @Override
    public int getItemViewType(int position) {
        return position;
    }
    

    This link will help you to get the understanding of the concept behind.

    How to fix Recyclerview shuffling issue

提交回复
热议问题