ListView/Adapter IllegalStateException
来源:互联网 发布:idea java log4j使用 编辑:程序博客网 时间:2024/05/21 03:17
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.
是不是你在用 adapter.notifyDataSetChanged() 刷新listview的时候,如果当前listview还未来得及刷新,你就去触摸listview,就会导致跳出出错信息呢?
解决办法是,通过设置listview.setVisibility(View.VISIBLE/View.GONE)。
在 adapter.notifyDataSetChanged() 之前调用listview.setVisibility(View.GONE);在adapter.notifyDataSetChanged() 之后调用listview.setVisibility(View.VISIBLE)
0 0
- ListView/Adapter IllegalStateException
- ListView/Adapter IllegalStateException
- ListView/Adapter IllegalStateException
- ListView/Adapter IllegalStateException
- ListView/Adapter IllegalStateException
- ListView/Adapter IllegalStateException
- ListView/Adapter IllegalStateException
- ListView/Adapter IllegalStateException
- 解决java.lang.IllegalStateException ( ListView adapter)
- ListView IllegalStateException
- ListView IllegalStateException
- Android, ListView IllegalStateException: “The content of the adapter has changed but ListView did no
- .IllegalStateException:The content of the adapter has changed but ListView did not receive a notific
- java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive
- java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive
- 解决java.lang.IllegalStateException: The content of the adapter has changed but ListView...的问题
- java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive
- java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive
- 人的生存离不开水,水维系着人的生命,人对水的情愫与生俱来
- 同学分享的新的
- 轻量级webservice解决方案Jax-ws(集成Spring3)
- 澳大利亚国立大学通过3D打印把手机变成显微镜成本不足2美元
- Golang写一个tcp聊天测试
- ListView/Adapter IllegalStateException
- redhat linux 中文乱码改为英文
- Android工具包xUtils
- 邮件营销在大数据时代下的适应逻辑
- 探索式测试解密——无探索,不测试!
- 版本分类
- 代理模式
- 向Dialog中加入String[]数组
- 腾讯面试题(统计数字出现的次数问题)