开发者

Android: Get number of groups in ExpandableListView?

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();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜