Android 折叠ExpandableListView组按钮上的项目在ChildItem中单击

Android 折叠ExpandableListView组按钮上的项目在ChildItem中单击,android,expandablelistview,expandablelistadapter,Android,Expandablelistview,Expandablelistadapter,是否可以在ExpandableListView或ExpandableListAdapter的GroupItem子项中单击按钮来折叠 我想要实现的是: 我有一个ExpandableListView,它由ExpandableListAdapter提供(扩展BaseExpandableListAdapter) 在ExpandableListAdapter的getChildView()方法中,我正在调用一个按钮(插入子项布局xml中),我希望在用户完成阅读后使用该按钮关闭特定的GroupItem。是。在

是否可以在
ExpandableListView
ExpandableListAdapter
GroupItem
子项中单击按钮来折叠

我想要实现的是:

我有一个
ExpandableListView
,它由
ExpandableListAdapter
提供(扩展
BaseExpandableListAdapter


ExpandableListAdapter
getChildView()
方法中,我正在调用一个按钮(插入子项布局xml中),我希望在用户完成阅读后使用该按钮关闭特定的
GroupItem

是。在调用listView.collapseGroup(groupNumber)的按钮上设置onClickListener

谢谢Gabe。这就是我试图实现的目标,但我无法在ExpandableListAdapter的getChildView()方法中获取ExpandableListView实例。请详细说明一下。将它传递给构造函数中的适配器,保存在成员变量中,然后您可以在任何地方使用它