android-advancedrecyclerview
android-advancedrecyclerview copied to clipboard
How to get adapter position with giving group position and child position?
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?
OK. I found it. It is in RecyclerViewExpandableItemManager's getFlatPosition