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?
You can get the group count through the ExpandableListView
's adapter:
ExpandableListView v;
[...]
final int groupCount = v.getExpandableListAdapter().getGroupCount();
精彩评论