android-advancedrecyclerview icon indicating copy to clipboard operation
android-advancedrecyclerview copied to clipboard

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

Open zeroarst opened this issue 3 years ago • 1 comments

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 avatar Sep 28 '21 07:09 zeroarst

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

zeroarst avatar Sep 28 '21 10:09 zeroarst