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

数据量大的时候如何避免快速滑动时数据错乱问题 #45

Open
Pom115 opened this issue Apr 8, 2022 · 0 comments
Open

Comments

@Pom115
Copy link

Pom115 commented Apr 8, 2022

RecyclerView避免快速滑动时数据错乱问题有一种方案是setHasStableIds(true)然后重写getItemId(position: Int)方法返回一个固定的id值,但是现在这个ExpandableRecyclerView组件有groupPosition和childPosition,没法直接重写getItemId(position: Int)方法,所以有避免快速滑动时数据错乱的更好的方案吗?或者如何保证getItemId(position: Int)返回唯一id值,且position能与groupPosition和childPosition对应上

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

1 participant