recyclerview notifyItemInserted没有更新

在使用RecyclerView过程中使用 notifyItemInserted notifyItemRangeRemoved等
方法时,还要调用notifyItemRangeChanged(position,list.size());

1
2
3
4
list.add(0, "leefeng.me" + "==onRefresh");
recycleview.stopRefresh(b);
adapter.notifyItemInserted(0);
adapter.notifyItemRangeChanged(0,list.size());

分享到 评论