11
notifyDataSetChange从自定义适配器不起作用
当我重新填充我的时ListView,我从我的容器中调用一个具体的方法Adapter。 问题: 当我updateReceiptsList从拨打电话时Adapter,数据会刷新,但我ListView无法反映更改。 问题: 为什么ListView我打电话时不显示新数据notifyDataSetChanged? 适配器: public class ReceiptListAdapter extends BaseAdapter { public List<Receipt> receiptlist; private Context context; private LayoutInflater inflater; private DateHelpers dateH; public ReceiptListAdapter(Activity activity, Context mcontext, List<Receipt> rl) { context = mcontext; receiptlist = rl; Collections.reverse(receiptlist); inflater = (LayoutInflater)activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE); dateH = new DateHelpers(); } @Override public int …