Listview嵌套Listview,item点击报错java.lang.IllegalStateException: The content of the a

Canra 2016-05-18 02:52:34
有个需求需要用到listview嵌套listview,数据加载显示完成后,点击子listview的item时,报错:log如下
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(2131297320, class android.widget.ListView) with Adapter(class com.zhkj.zhpf.prodbrowse.AllMarketFloorActivity$SecondItemAdapter)]
百度了下,调了一个多小时没调好,子listview的数据是在父listview中getview遍历的时候放进去的,代码如下:







是不是adapter没及时刷新导致的问题,求解,
...全文
164 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
weimingyu_ 2017-04-13
  • 打赏
  • 举报
回复
怎么解决的?
Canra 2016-05-18
  • 打赏
  • 举报
回复
。。。。已解决问题

80,359

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧