ExpandableListView实现子Item的点击事件

时间:2023-03-09 15:31:33
ExpandableListView实现子Item的点击事件

在继承的BaseExpandableListAdapter的ExpandableListView的Adapter中,重写以下方法

@Override
public boolean isChildSelectable(int groupPosition, int childPosition) {
return true;
}

然后设置ExpandableListView的 setOnChildClickListener。即可实现子Item的点击事件

相关文章