如聊天记录界面,往上加载更多数据时,头部插入更多数据
mList.addAll(0, pList);
之后刷新界面,需位置不变,继续往上滑
使用notifyItemRangeInserted 替代notifyDataSetChanged
// mAdapter.notifyDataSetChanged();
// mAdapter.notifyItemInserted(0);
mAdapter.notifyItemRangeInserted(0,pList.size());