davideas / FlexibleAdapter

Fast and versatile Adapter for RecyclerView which regroups several features into one library to considerably improve the user experience :-)
Apache License 2.0
3.55k stars 548 forks source link

When an expandable is collapsed, is it needed to call the `expand()` method to kind of "commit" the items to the expandable sublist? #714

Closed johnernest02 closed 5 years ago

johnernest02 commented 5 years ago

I am basically talking about this Tip in the wiki

When expandable is collapsed you can add/set elements to the expandable sub list and then call expand()! Check AbstractExpandableItem class, it has already utility methods for sub list.

Is it needed to call expand() so that the items are committed to the expandable? I am experiencing this exact issue. When I add subitems while expandable is collapsed, it does not get added to the sublist. But when I add the subitems while collapsed, and then call expand() the items are there. Is there a way around that I can add subitems to a collapsed expandable?

davideas commented 5 years ago

@dev-JE02, unfortunately that is the way I identified, the adapter is the only component that triggers the event and not the way around.