The content of the adapter has changed but ListView did not receive a notification异常处理
来源:互联网 发布:v7000数据迁移图文教程 编辑:程序博客网 时间:2024/05/17 19:18
最近在做一个文件浏览器的模块,采用分步显示数据而不是等待加载完成后再一次性加载,但在编写过程中发现,在异步线程中添加Listview的Adapter的数据时,当数据未加载完成点击Listvew的Item时,会出现如下异常:
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.
搜索相关资料后整理出解决办法如下:
将异步线程中添加Adapter数据的代码移出至回调时添加。
注:需要注意不能让UI线程负荷太重。
0 0
- 处理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异常
- 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 异常解决
- 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.
- 全功能DB数据库管理工具,超赞,完全支持所有主流数据库
- OCR备份后,我们看看里面的内容
- openfire源码研究笔记:对设计模式及原则的学习
- android登陆获取验证码倒计时功能的实现(CountDownTimer)
- 2016年 IT 趋势大预测!
- The content of the adapter has changed but ListView did not receive a notification异常处理
- 手写的Android命名规范
- Jmeter:图形界面压力测试工具
- Linux常用操作-压缩与解压缩
- 《从零开始学Swift》学习笔记(Day 59)——代码排版
- 编程习惯-函数无参数用void填充
- spring原理及工作方式
- linux usb枚举过程分析
- OC语言@property @synthesize和id