We have four ListViews in a FrameLayout in one of our activities. We
also have a common WebView in this Framelayout set as EmptyView for
each of these lists.
The content of this TextView is supposed to change at runtime
depending on different contexts.

As a result, we call:
1. mEmptyView.loadData(...) followed by
2. mListOne.setEmptyView(mEmptyView) calls.

This works fine most of the times. But sometimes we are getting,
IllegalStateException.

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. [in ListView(2131362332, class
android.widget.ListView) with Adapter(class my.own.activity.MainAct
$UIAdapter)]
at android.widget.ListView.layoutChildren(ListView.java:1492)
at android.widget.AbsListView.onLayout(AbsListView.java:1147)
at android.widget.AdapterView.updateEmptyStatus(AdapterView.java:724)
at android.widget.AdapterView.setEmptyView(AdapterView.java:637)

Question: Is it safe to change content of an empty view and call
ListView#setEmptyView at runtime?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to