去除RecycleView的刷新动画

参考文章:https://blog.csdn.net/SolarLove/article/details/106275533?utm_medium=distribute.pc_aggpage_search_result.none-task-blog-2aggregatepagefirst_rank_ecpm_v1~rank_v31_ecpm-1-106275533.pc_agg_new_rank&utm_term=recyclerview%E5%88%B7%E6%96%B0%E5%8A%A8%E7%94%BB%E9%97%AA%E7%83%81&spm=1000.2123.3001.4430

recyclerView.getItemAnimator().setAddDuration(0);
        recyclerView.getItemAnimator().setChangeDuration(0);
        recyclerView.getItemAnimator().setMoveDuration(0);
        recyclerView.getItemAnimator().setRemoveDuration(0);
        ((SimpleItemAnimator)recyclerView.getItemAnimator()).setSupportsChangeAnimations(false);
      

你可能感兴趣的:(去除RecycleView的刷新动画)