Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

goodview在recyleview中动效位置会变化 #3

Closed
protectedMan opened this issue Nov 5, 2018 · 2 comments
Closed

goodview在recyleview中动效位置会变化 #3

protectedMan opened this issue Nov 5, 2018 · 2 comments

Comments

@protectedMan
Copy link

qq20181105-094940-hd
我点赞在下面一个item,动效却在上面。非必现。

@merbng
Copy link

merbng commented Jul 16, 2019

必现的。只要列表数据多于一屏就会出现。

@merbng
Copy link

merbng commented Jul 17, 2019

研究了一下,不是作者的问题,是RecycleView复用的问题, 点赞后 调用一下notifyItemChanged(position)就可以解决,但是item会闪烁一下,可以设置禁用item动画((SimpleItemAnimator)recyclerView.getItemAnimator()).setSupportsChangeAnimations(false);或者recyclerView.getItemAnimator().setChangeDuration(0);// 通过设置动画执行时间为0来解决闪烁问题,还可以重写RecyclerView.ItemAnimator 给RecycleView设置mRecycleView?.itemAnimator= NoAlphaItemAnimator()禁用动画

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants