I'm opening this question gain since #107 was closed without a solution.
I couldn't manage to tie together the ExpandableGroup with the UpdatingGroup to add/remove items from a group.
Any help will be wellcome!
Thanks
I'm not sure exactly what you're trying to achieve, but it's possible that it's related to this bug. https://github.com/lisawray/groupie/issues/124
Generally, if I expect updates to the contents of an ExpandableGroup, I add an UpdatingGroup as its only child and put all the expanded content into the UpdatingGroup directly. Does that help?
Wish I came across this sooner! For anyone else in a similar situation:
It looks like UpdatingGroup is now deprecated, and replaced by Sections. The Kotlin example (non-databinding) includes an example of removing items from a Section by swipe. As Lisa mentioned, you can add the Section directly to your adapter, or to an ExpandableGroup.
I was following the databinding example, where child groups were directly added to the ExpandableGroup. It wasn't until later that I tried removing groups, and realized ExpandableGroup doesn't support this. You also can't override the remove method, since the children list in ExpandableGroup is private and not protected. I ended copying ExpandableGroup into a new class, where remove() is implemented, but this is not the correct way.
I think it might be helpful to clarify this in the documentation, perhaps even with this specific example (add a Section which can be updated, to an ExpandableGroup which does not support removing items). The library itself is fantastic, as long as it's used properly.
closing as this functionality exists in ExpandableGroup
Most helpful comment
Wish I came across this sooner! For anyone else in a similar situation:
It looks like UpdatingGroup is now deprecated, and replaced by Sections. The Kotlin example (non-databinding) includes an example of removing items from a Section by swipe. As Lisa mentioned, you can add the Section directly to your adapter, or to an ExpandableGroup.
I was following the databinding example, where child groups were directly added to the ExpandableGroup. It wasn't until later that I tried removing groups, and realized ExpandableGroup doesn't support this. You also can't override the remove method, since the children list in ExpandableGroup is private and not protected. I ended copying ExpandableGroup into a new class, where remove() is implemented, but this is not the correct way.
I think it might be helpful to clarify this in the documentation, perhaps even with this specific example (add a Section which can be updated, to an ExpandableGroup which does not support removing items). The library itself is fantastic, as long as it's used properly.