Closed ConorGarry closed 7 years ago
Layout doesn't support header visibility control. Header will always be visible, even if section is empty. One of the ways to implement it, is to create custom adapter that removes empty sections or reinserts non empty, with full reload using notifyAllSectionsDataSetChanged().
So I have a group with sub-items. When I remove the items it works fine with
notifySectionItemRemoved(section, item)
This removes the item, but if it's the last item, the header remains. I have tried
notifySectionHeaderChanged(section);
and I have even tried using the initial RecyclerView adapter's
if (mGroupedList.get(section).postList.size() == 0) { notifyItemRemoved(section);}
Still no luck. Is there anything else I need to do to remove it?