有个需求需要用到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没及时刷新导致的问题,求解,