I am using three tabs.when i click the tab, an activity starts that displays multiple listview with header.For that i use listadapter
and my code seems adapter.addsection("Header String",new ArrayAdapter(this,R.layout.row,cursor,from,to);
then i set list using
list.setadapter(adapter).It all works fine when i click the tab.My problem occurs, after i scroll my listview which is in another activity and
press emulator back button and clicking tab.Now when i am clicking tab,my application crashes and logcat shows the following error.
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(-1, class android.widget.ListView) with Adapter(class com.t.s.SeperatedListAdapter)]
Whats the solution for this? I used adapter.notifydatasetchanged() to solve this.Eventhough i couldn't.