We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
我点赞在下面一个item,动效却在上面。非必现。
The text was updated successfully, but these errors were encountered:
必现的。只要列表数据多于一屏就会出现。
Sorry, something went wrong.
研究了一下,不是作者的问题,是RecycleView复用的问题, 点赞后 调用一下notifyItemChanged(position)就可以解决,但是item会闪烁一下,可以设置禁用item动画((SimpleItemAnimator)recyclerView.getItemAnimator()).setSupportsChangeAnimations(false);或者recyclerView.getItemAnimator().setChangeDuration(0);// 通过设置动画执行时间为0来解决闪烁问题,还可以重写RecyclerView.ItemAnimator 给RecycleView设置mRecycleView?.itemAnimator= NoAlphaItemAnimator()禁用动画
((SimpleItemAnimator)recyclerView.getItemAnimator()).setSupportsChangeAnimations(false);
recyclerView.getItemAnimator().setChangeDuration(0);// 通过设置动画执行时间为0来解决闪烁问题
RecyclerView.ItemAnimator
mRecycleView?.itemAnimator= NoAlphaItemAnimator()
No branches or pull requests
我点赞在下面一个item,动效却在上面。非必现。
The text was updated successfully, but these errors were encountered: