文档地址 https://developer.android.google.cn/reference/android/widget/ExpandableListView
1ExpandableListView的常用属性
<ExpandableListView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:groupIndicator="@drawable/ic_launcher_foreground" //分组指示器
android:childIndicator="@drawable/ic_launcher_foreground" //子类的分组指示器
android:childDivider="@color/colorAccent" //子类之间的分隔线
></ExpandableListView>
groupIndicator 分组指示器
childIndicator 子类的分组指示器
childDivider 子类之间的分隔线
2 ExpandableListView 的常用方法
setAdapter(ExpandableListAdapter)
setOnGroupClickLister 点击分组条目时的回调
setOnChildClickLister 点击子类条目时的回调
setOnGroupCollapseLister 点击分组条目时收缩的回调
setOnGroupExpandLister 点击分组条目时展开的回调