如下错误:
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);