- Activity 布局文件
我们可以通过 ExpandableListView 的默认属性来控制部分样式,这里贴上菜鸟教程的属性图片
- 一级菜单布局文件
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android=“http://schemas.android.com/apk/res/android”
android:layout_width=“match_parent”
android:layout_height=“44dp”
xmlns:app=“http://schemas.android.com/apk/res-auto”
android:background="@drawable/chapter_gradient_group">
</androidx.constraintlayout.widget.ConstraintLayout>
- 二级菜单布局文件
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android=“http: