expandablerecycler
expandablerecycler copied to clipboard
How do I make sure to set only one item expanded at any given point of time?
trafficstars
Instead of saving the state of each of your items, you only need to save the index of one item (the expanded one). Inside click listener, check the index of the previous expanded item, collapse it, expand the new one, update the variable with the new index, notify adapter about the changes.