Wrong behavior expand and collapse on recyclerview
Closed this issue · 1 comments
araurangel commented
I got problem while using recyclerview because recyclerview is recycle it make item collapse and expand in wrong position while you scroll with recyclerview have alot item... are there any idea I could solve this problem ? @Pakhaliuk
patrickds commented
Take a look at the adapter used in the example.
Basically everytime a cell is unfolded you save its index in a list, then when creating the view (binding in recycler view) you lookup at the list of unfolded indexes and call cell.unfold(true) if the current index is in that list. Note the true parameter indicating to skip the animation.
Hope it helps.