1,常見的一搜都是說設置動畫,這種不一定有效
// 第一種,直接取消動畫
RecyclerView.ItemAnimator animator2 = recyclerView.getItemAnimator();
if (animator2 instanceof SimpleItemAnimator) {
((SimpleItemAnimator) animator2).setSupportsChangeAnimations(false);
}
2,第二種就是直接給adpter設置一個屬性完事,這種有效
adapter.setHasStableIds(true);
根據不同場景多嘗試