您的位置:首页 > 其它

The content of the adapter has changed but ListView did not receive a notification 异常解决

2015-01-26 15:04 597 查看
我的项目中使用了PullToRefrehshListView,跑monkey,有时候会出现如下异常

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.


说是Adapter改变数据没有notifyDataSetChanged或者是后台线程进行了adapter数据更新

但是我的项目中没有发现如提示的操作

最终被我找到了罪魁祸首是

mListView.setEmptyView(noShineView);
改成

mListView.getRefreshableView().setEmptyView(noShineView);
就再也没有出过类似问题了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐