Reputation: 7988
is there a way to get the number of groups in an ExpandableListView? Or do I have to "remember" how many group items I have added?
Upvotes: 4
Views: 4484
Reputation: 19220
You can get the group count through the ExpandableListView
's adapter:
ExpandableListView v;
[...]
final int groupCount = v.getExpandableListAdapter().getGroupCount();
Upvotes: 16