Listview数据刷新异常报错

03-09 00:20:25.999: E/AndroidRuntime(17129): 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. [in ListView(2131361935, class com.kaibes.im.view.listview.ContactListview) with Adapter(class android.widget.HeaderViewListAdapter)]

听说用下面的方法就不会报错了

ListView.requestLayout();
Adatper.notifyDataSetChanged();

 

还没有检验过,先记下来,慢慢检验

你可能感兴趣的:(线程,UI,数据,报错,ListView,异常,刷新)