【发布时间】:2012-08-16 15:17:04
【问题描述】:
我在这篇文章中发现了我的问题Updating ExpandableListView with notifyDataSetChanged()
“每次使用 setNotifyDatasetChanged 刷新视图时,适配器都会调用列表周围的循环。由于您所做的更改,适配器中的列表会获得空值。”
我是初学者,无法正确更改列表
我的资源
public class UrlArrayAdapter extends ArrayAdapter<UrlItem> {
private LayoutInflater inflater;
private ListView urlListView1;
private ArrayList<UrlItem> urlItems1;
public UrlArrayAdapter(Context context, ListView urlListView,
ArrayList<UrlItem> urlLists) {
super(context, urlListView.getId(), urlLists);
this.urlItems1 = urlLists;
this.urlListView1 = urlListView;
inflater = LayoutInflater.from(context);
如何从基础适配器的 urlLists 中的列表中删除项目??
【问题讨论】:
-
我决定了。此链接上的决定stackoverflow.com/a/12049357/1568164
标签: android baseadapter