Inconsistency detected in RecyclerView, How to change contents of RecyclerView while scrolling

前端 未结 26 2518
借酒劲吻你
借酒劲吻你 2020-12-01 00:59

I\'m using RecyclerView to display name of the items. My row contains single TextView. Item names are stored in List mItemList<

26条回答
  •  悲哀的现实
    2020-12-01 02:02

    I am altering data for the RecyclerView in the background Thread. I got the same Exception as the OP. I added this after changing data:

    myRecyclerView.post(new Runnable() { @Override public void run() { myRecyclerAdapter.notifyDataSetChanged(); } });

    Hope it helps

提交回复
热议问题