下面列出了我想要的代码。
此方法不会在单击按钮时刷新列表视图。
public synchronized void refresAdapter(ArrayList<ManageCuisineHelper> dataitems) {
notifyDataSetChanged();
}
您没有在Adapter类的refreshAdapter方法中更新最新数据。像下面那样更改方法主体,它应该对您有用。
public synchronized void refresAdapter(ArrayList<ManageCuisineHelper> dataitems) {
if(this.list_data != null) {
this.list_data.clear();
this.list_data = dataitems;
notifyDataSetChanged();
}
}