SimpleExpandableListAdapter用于展开列表,比如QQ好友列表
layout-activity_main:
<ExpandableListView
android:id="@+id/my_elv"
android:layout_width="match_parent"
android:layout_height="match_parent">
</ExpandableListView>
layout-item_group:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="50dp"
android:gravity="center_vertical"
android:paddingLeft="30dp">左边偏移30,显示三角形
<TextView
android:id="@+id/group"
android:layout_width="match_parent