RecyclerView刷新Item会造成闪烁bug解决

来源:互联网 发布:信息检索系统知乎 编辑:程序博客网 时间:2024/06/02 07:31
ItemAnimator animator = recyclerView.getItemAnimator();if (animator instanceof SimpleItemAnimator) {  ((SimpleItemAnimator) animator).setSupportsChangeAnimations(false);}

参考文档:http://stackoverflow.com/questions/29331075/recyclerview-blinking-after-notifydatasetchanged

0 0
原创粉丝点击