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(2131231139, class android.widget.ListView) with Adapter(class android.widget.HeaderViewListAdapter)]
at android.widget.ListView.layoutChildren(ListView.java:1538)
at android.widget.AbsListView.onTouchModeChanged(AbsListView.java:2977)
at android.view.ViewTreeObserver.dispatchOnTouchModeChanged(ViewTreeObserver.java:606)
at android.view.ViewRootImpl.ensureTouchModeLocally(ViewRootImpl.java:2766)
at android.view.ViewRootImpl.ensureTouchMode(ViewRootImpl.java:2750)
at android.view.ViewRootImpl.deliverPointerEvent(ViewRootImpl.java:2889)
at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2471)
at android.view.ViewRootImpl.processInputEvents(ViewRootImpl.java:849)
at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2480)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4424)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
=============================================================================================
1.是否在主线程
2.设置数据之前要隐藏view,设置之后再显示view
3.要clear,后要notifyDateChanged
4.暂停时停止后台操作,恢复后清空adapter,再重新加载
分享到:
相关推荐
ListView:The content of the adapter has changed but ListView did not receive a notification使用ListView时遇到如下的异常信息: 10-26 18:30:45.085: E/AndroidRuntime(7323): java.lang....
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...
Android自定义adapter的listview代码
Adapter,Spinner,ListView及其优化
it's a normal Android listview adapter.The adapter extends BaseAdapter...
Adapter放到ListView的三种方式
基于Eclipse开发平台,Android中使用ListView和三种适配器(ArrayAdaper,SimpleAdapter,BaseAdapter)实现数据的填充。
Android之自定义Adapter的ListView
使用三种Adapter构建ListView
Android listview与adapter操作和用法
Adapter,Spinner,ListView及其优化
安卓listview自定义adapter包括demo和一些其他自定义绑定的代码
In the MouseMove event you need to check the index of the item under the mouse pointer, and if this item is changed, you simply redefine the text of the tooltip attached to the ListView control....
Adapter的一种写法 package com.xxkjx.jiusanqi; import java.util.List; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; ...
listview中通用adapter,方法封装,调用方便简单
listView 添加多个不同的
ListView 通过adapter传递对象
分别用simple Adapter和array Adapter实现listview的布局,用simple Adapter实现gridview的布局。
这是我一下午的总结,listview常用的方法,和三种基本适配器以及实际开发中通过泛型的适配器以及万能适配器,如果大家感兴趣,这里有文章的地址:http://write.blog.csdn.net/postlist