首先将自定义的适配器的代码列下,主要是构造函数中List<DataBean> list 数据变化了,怎么更新UI的问题
public class SaveShowAdpter extends BaseAdapter {
private Context context = null;
private LayoutInflater listContainer = null;
private List<DataBean> list;
public SaveShowAdpter(Context activity, List<DataBean> list) {
context = activity;
listContainer = (LayoutInflater) context
.getSystemService(Activity.LAYOUT_INFLATER_SERVICE);
this.list = list;
}
/**
*当list数据发生变化时候开始调用
* removeBean(DataBean dataBean)、 addBean(DataBean dataBean)
*