关闭

The content of the adapter has changed but ListView did not receive a notification

283人阅读 评论(0) 收藏 举报
在Android编程中使用Adapter时,偶尔会出现如下错误: 

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。

看了网上好几个帖子 

http://bbs.csdn.net/topics/390286824

http://www.eoeandroid.com/thread-79950-1-1.html

http://blog.csdn.net/garybook/article/details/7498342

http://gundumw100.iteye.com/blog/1738829

最直接有效的就是  从线程新获得的新数据先传到主线程,不要直接在子线程中为其赋值.

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:5797次
    • 积分:116
    • 等级:
    • 排名:千里之外
    • 原创:4篇
    • 转载:12篇
    • 译文:0篇
    • 评论:0条
    文章分类