如何获得ExpandableListView点击计数

时间:2018-09-23 09:22:36

标签: java android arrays

我在应用中使用composer.lock,我想知道列表视图中有多少点击计数。
expandableListView具有哈希图,并在此处获取数据。
我想在expandablelist数组中设置计数(但不可​​见),并且可以在另一个类中获取计数。
HashMap由expandableListView组成,因此我仅获得主列表名称和子列表名称。
我想在数组列表中设置点击计数,但是如何设置呢?

Hash<String, List<string>>

1 个答案:

答案 0 :(得分:0)

使用适配器

ExpandableListAdapter adapter = parent.getExpandableListAdapter()

您可以访问的槽式适配器

getChildrenCount()

getGroupCount()