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

How to get adapter position with giving group position and child position? #514

Open
zeroarst opened this issue Sep 28, 2021 · 1 comment

Comments

@zeroarst
Copy link

zeroarst commented Sep 28, 2021

I have group position and child position

val groupPos = 1
val childPos = 2
val packedChildPos = RecyclerViewExpandableItemManager.getPackedPositionForChild(groupPos , childPos )
val adapterPos = RecyclerViewExpandableItemManager.getPackedPositionChild(packedChildPos)

but this is incorrect. Dose anyone know what is the correct way to do it?

Also I found it is very confusing with getPackedPositionForChild and getPackedPositionChild names.
Maybe should should call them packPositionForChild and unpackPositionForChild if I understand these two methods properly?

@zeroarst
Copy link
Author

zeroarst commented Sep 28, 2021

OK. I found it. It is in RecyclerViewExpandableItemManager's getFlatPosition

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