What I want to do: run a background thread which calculates ListView contents and update ListView partially, while results are calculated.
W
Please try one of these solutions :
Sometimes, if you add new object to data list in a thread (or doInBackground method), this error will occur. The solution is : create a temporary list and do adding data to this list in thread(or doInBackground), then do copying all data from temporary list to the list of adapter in UI thread (or onPostExcute)
Make sure all UI updates are called in UI thread.