这一章的内容比较少, 因为只是提示如何讲上一章的ExpandableListView控件化.
控件化比较简单我们只要用普通的Activity类就可以了, 不用再继承ExpandableListView.
只需要在成员变量中添加
private ExpandableListView expandList;
然后在添加内容时改成
expandList.setAdapter(sela);
就可以了。 当然, 响应事件Listener也可以自己添加。
这一章的内容比较少, 因为只是提示如何讲上一章的ExpandableListView控件化.
控件化比较简单我们只要用普通的Activity类就可以了, 不用再继承ExpandableListView.
只需要在成员变量中添加
private ExpandableListView expandList;
然后在添加内容时改成
expandList.setAdapter(sela);
就可以了。 当然, 响应事件Listener也可以自己添加。