随笔杂记

   :: 首页 :: 新随笔 ::  ::  :: 管理 ::
如下错误:

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.

可以使用如下方式解决:
将notifyDataSetChanged 放在handler中,同时加上红字字体代码:

mWifiListView.setVisibility(View.GONE);
mWifiListAdapter.notifyDataSetChanged();
mWifiListView.setVisibility(View.VISIBLE);    
posted on 2012-09-13 10:12 天宇恒星 阅读(941) 评论(0)  编辑  收藏 所属分类: Android

只有注册用户登录后才能发表评论。


网站导航: