本文实例为大家分享了ExpandableListView使用示例,供大家参考,具体内容如下

MainActivity:
public class Expandable_test extends Activity {
private ExpandableListView listView;
private Map> dataset = new HashMap<>();
private String[] parentList = new String[]{"第一个菜单", "第二个菜单"};
private ExpandableListViewAdpter adpter;
private Context mContext = this;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_expandable_test);
listView=(ExpandableListView)findViewById(R.id.expandableListViewtext);
adpter=new ExpandableListViewAdpter(this,parentList);
listView.setAdapter(adpter);
}
}

售后响应及时
7×24小时客服热线
数据备份
更安全、更高效、更稳定
价格公道精准
项目经理精准报价不弄虚作假
合作无风险
重合同讲信誉,无效全额退款