80,490
社区成员
发帖
与我相关
我的任务
分享java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive a notification. Make sure the content of your adapter is not modified from a background thread, but only from the UI thread. Make sure your adapter calls notifyDataSetChanged() when its content changes. [in ListView(2131034293, class com.gaokao.ppst.utils.XListView) with Adapter(class android.widget.HeaderViewListAdapter)@Override
public void onRefresh() {
mHandler.postDelayed(new Runnable() {
@Override
public void run() {
URL = "http://10.230.17.157:8080/yygk/SetNewsList";
new NewsListLoadMore().execute(URL);//这里执行异步操作的
onLoad();
}
}, 2000);
}if (mAdapter == null) {
mAdapter = new TabNewsListViewAdapter(mContext, result);
mNewsListView.setAdapter(mAdapter);
mAdapter.notifyDataSetChanged();
} else {
mAdapter.onDateChange(result);
mAdapter.notifyDataSetChanged();
}