java.lang.IllegalStateException:适配器的内容已更改,但ListView未收到嵌套ListView的通知

时间:2016-02-29 10:30:10

标签: android listview

我正在使用自定义ListViewBaseAdapter。我的自定义ListView包含另一个自定义ListView,因此我在BaseAdapter上呼叫另一个getView()。它正在完美地显示数据但是当我触摸嵌套ListView上的任何项目时,应用程序崩溃并显示以下错误:

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(2131296379, class com.amibiotech.dynamin.NonScrollListView) with Adapter(class com.amibiotech.dynamin.MyOrderProducts)]

请帮我解决这个问题。