【问题标题】:Android: Get number of groups in ExpandableListView?Android:获取 ExpandableListView 中的组数?
【发布时间】:2011-05-20 11:41:37
【问题描述】:

有没有办法获取 ExpandableListView 中的组数?还是我必须“记住”我添加了多少组项目?

【问题讨论】:

    标签: java android user-interface expandablelistview


    【解决方案1】:

    您可以通过ExpandableListView的适配器获取组数:

    ExpandableListView v;
    [...]
    final int groupCount = v.getExpandableListAdapter().getGroupCount();
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多