KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am using AsyncTask to set my items and stuff, in the postExecute i call a synchronized Method where i do this mAllResultsAdapter.setItems(mAllResultsItem); mAllResultsAdapter.notifyDataSetChanged(); mListView.invalidate(); mListView.requestLayout(); Most of the time if I dowload new data and update my listview/adapter it simply works, and pretty good to. But somehow it crashes sometime, can anyone assist me with this issue. heres my crash log. 03-19 14:15:02.170: E/AndroidRuntime(23242): FATAL EXCEPTION: main 03-19 14:15:02.170: E/AndroidRuntime(23242): 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(2131034153, class android.widget.ListView) with Adapter(class com....tracebuzz.allresults.AllResultsAdapter)] 03-19 14:15:02.170: E/AndroidRuntime(23242): at android.widget.ListView.layoutChildren(ListView.java:1556) 03-19 14:15:02.170: E/AndroidRuntime(23242): at android.widget.AbsListView.onLayout(AbsListView.java:1993) 03-19 14:15:02.170: E/AndroidRuntime(23242): at android.view.View.layout(View.java:9606) 03-19 14:15:02.170: E/AndroidRuntime(23242): at android.view.ViewGroup.layout(ViewGroup.java:3879) 03-19 14:15:02.170: E/AndroidRuntime(23242): at android.widget.FrameLayout.onLayout(FrameLayout.java:400) 03-19 14:15:02.170: E/AndroidRuntime(23242): at android.view.View.layout(View.java:9606) 03-19 14:15:02.170: E/AndroidRuntime(23242): at android.view.ViewGroup.layout(ViewGroup.java:3879) 03-19 14:15:02.170: E/AndroidRuntime(23242): at android.widget.RelativeLayout.onLayout(RelativeLayout.java:912) 03-19 14:15:02.170: E/AndroidRuntime(23242): at android.view.View.layout(View.java:9606) 03-19 14:15:02.170: E/AndroidRuntime(23242): at android.view.ViewGroup.layout(ViewGroup.jav
Tags (comma-separated)
Save Edits
Cancel