The content of the adapter has changed but ListView did not receive a notification.
来源:互联网 发布:centos改成中文 编辑:程序博客网 时间:2024/06/16 15:13
: 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. Make sure your adapter calls notifyDataSetChanged() when its content changes. [in ListView(2131689650, class com.ttxs.lite.commonui.view.pull.PullableListView) with Adapter(class com.ttxs.lite.commonui.adapter.HasFinishedAdapter)] at android.widget.ListView.layoutChildren(ListView.java:1623) at android.widget.AbsListView.onLayout(AbsListView.java:2210) at android.view.View.layout(View.java:17688) at android.view.ViewGroup.layout(ViewGroup.java:5631) at com.ttxs.lite.commonui.view.pull.PullToRefreshLayout.onLayout(PullToRefreshLayout.java:545) at android.view.View.layout(View.java:17688) at android.view.ViewGroup.layout(ViewGroup.java:5631) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1762) at android.widget.LinearLayout.layoutHorizontal(LinearLayout.java:1751) at android.widget.LinearLayout.onLayout(LinearLayout.java:1517) at android.view.View.layout(View.java:17688) at android.view.ViewGroup.layout(ViewGroup.java:5631) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:325) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:17688) at android.view.ViewGroup.layout(ViewGroup.java:5631) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1762) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1606) at android.widget.LinearLayout.onLayout(LinearLayout.java:1515) at android.view.View.layout(View.java:17688) at android.view.ViewGroup.layout(ViewGroup.java:5631) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:325) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:17688) at android.view.ViewGroup.layout(ViewGroup.java:5631) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1762) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1606) at android.widget.LinearLayout.onLayout(LinearLayout.java:1515) at android.view.View.layout(View.java:17688) at android.view.ViewGroup.layout(ViewGroup.java:5631) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:325) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:17688) at android.view.ViewGroup.layout(ViewGroup.java:5631) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1762) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1606) at android.widget.LinearLayout.onLayout(LinearLayout.java:1515) at android.view.View.layout(View.java:17688) at android.view.ViewGroup.layout(ViewGroup.java:5631) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:325) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at com.android.internal.policy.DecorView.onLayout(DecorView.java:774) at android.view.View.layout(View.java:17688) at android.view.ViewGroup.layout(ViewGroup.java:5631) at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2513) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2228) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1366) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6768) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:926) at android.view.Choreographer.doCallbacks(Choreographer.java:735) at android.view.Choreographer.doFrame(Choreographer.java:667) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:912) at android.os.Handler.handleCallback(Handler.java:761) at android.os.Handler.dispatchMessage(Handler.java:98) at android.os.Looper.loop(Looper.java:156) at android.app.ActivityThread.main(ActivityThread.java:6523) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:941) at com.android.internal
dataList.clear();mAdapter.notifyDataSetChanged();
报这个错误,是由于adapter 的数据源发生了改变,而没有调用 adapter.notifyDataSetChanged();方法,在数据发生改变之后 调用下此方法即可。
阅读全文
0 0
- listview提示The content of the adapter has changed but ListView did not receive a notification
- ListView异常:The content of the adapter has changed but ListView did not receive a notification
- ListView The content of the adapter has changed but ListView did not receive a notification.
- The content of the adapter has changed but ListView did not receive a notification.
- The content of the adapter has changed but ListView did not receive a notification
- 解决bug:The content of the adapter has changed but ListView did not receive a notification
- The content of the adapter has changed but ListView did not receive a notification
- The content of the adapter has changed but ListView did not receive a notification.
- The content of the adapter has changed but ListView did not receive a notification
- .解决bug:The content of the adapter has changed but ListView did not receive a notification .
- The content of the adapter has changed but ListView did not receive a notification终极解决方法
- 处理The content of the adapter has changed but ListView did not receive a notification异常
- The content of the adapter has changed but ListView did not receive a notification错误分析
- The content of the adapter has changed but ListView did not receive a notification 异常解析
- 处理The content of the adapter has changed but ListView did not receive a notification异常
- The content of the adapter has changed but ListView did not receive a notification终极解决方法
- The content of the adapter has changed but ListView did not receive a notification
- The content of the adapter has changed but ListView did not receive a notification.
- VC在多文本的CDockable中使用CScrollView的问题
- java学习笔记(3)-HashMap类
- java中的字符串String
- Linux 常用命令
- git常用命令
- The content of the adapter has changed but ListView did not receive a notification.
- c++版本的高斯混合模型的源代码完全注释
- jqgrid实现字段显示或隐藏问题
- Android源码(10) --- Binder(4) ServiceManager 启动
- Vue国际化处理 vue-i18n 以及项目自动切换中英文
- Java 容器与并发
- 算法竞赛入门经典习题3-5
- 【读书笔记】TCP/IP网络编程 第7章 半关闭
- 前端基础面试题