我有一个扩展BaseExpandableListAdapter的ExpandableListView。我想动态添加ExpandableListView的子项(对于每个子布局可能不同)。请帮助我。
答案 0 :(得分:0)
在您的Activity中实现OnChildClickListener并实现此方法..
@Override
public boolean onChildClick(ExpandableListView parent, View v,
int groupPosition, int childPosition, long id) {
//Add new chid data in your list (ex ArrayLis or Array whatever you use)
adapter.notifyDataSetChanged() // BaseExpandableListAdapter's adapter...
return true;
}
这对你有用吗?