i have my expandable recyclerview set with two layouts HEADER and CHILD. Everything is working fine.
i have used different layouts for header and child.
when the users click one header, i want my program to check if any other header is expanded. if yes it needs to be collapsed. onclicking one menu the last expanded view should collapse.
i have tried using boolean flag. can anyone please help me
If you use this library to create your expandable sections like in this example, you can loop through the instances of your ExpandableContactsSection and check the flag 'expanded'.