RecyclerView items duplicate and constantly changing

后端 未结 8 2273
遥遥无期
遥遥无期 2020-12-13 04:14

What\'s Happening:

The list (RecyclerView) is mixing up the data when I scroll.

I.E when I scr

8条回答
  •  情话喂你
    2020-12-13 05:02

    Only two things in your RecyclerView adapter

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

    and in constructor of adapter

     setHasStableIds(true);
    

    Hope it helps!

提交回复
热议问题