可扩展的列表视图是正确的,但在再次调用时它不会刷新.旧的项目再次出现在可扩展列表视图中.这是我的适配器类.如何在expab = ndable listview中刷新项目?
MyAdapter.class
public class MyAdapter extends BaseExpandableListAdapter {
private Context _context;
private static List<String> _listDataHeader; // header titles
// child data in format of header title, child title
private static HashMap<String, List<String>> _listDataChild;
public MyAdapter(Context context, List<String> listDataHeader,HashMap<String, List<String>> listChildData) {
this._context = context;
this._listDataHeader = listDataHeader;
this._listDataChild = listChildData;
}
@Override
public Object getChild(int groupPosition, int childPosititon) {
return this._listDataChild.get(this._listDataHeader.get(groupPosition)).get(childPosititon);
}
@Override
public long getChildId(int groupPosition, int childPosition) {
return childPosition;
}
@Override
public View getChildView(int …Run Code Online (Sandbox Code Playgroud)