[android-developers] Re: List View not properly updated from AsyncTask

2009-07-14 Thread pperotti
Hi Romain, I am actually using in List3 adapter.notifyDatasetChanged(). This do not freeze the app but do not allow the user to scroll perfectly as in List1. For some reason (the amount of operations probably in the AsyncTask) the ListView is not entirely independent from the data set affecting

[android-developers] Re: List View not properly updated from AsyncTask

2009-07-14 Thread Streets Of Boston
First: You directly modify the activity's attribute 'items' (that serves as your data in your list-adapter) in your background thread, without any proper synchronization with the main GUI-thread. This is bad news. It may work for a while, but it's bound to fail at some point. Second (and i

[android-developers] Re: List View not properly updated from AsyncTask

2009-07-13 Thread Romain Guy
Do NOT call invalidateViews(), it calls ListView to throw everything away. Use Adapter.notifyDatasetChanged() instead. On Mon, Jul 13, 2009 at 10:15 PM, pperottipablo.pero...@gmail.com wrote: Hi Everyone, After digging with the APIs I still cannot figure out how the AsyncTask properly works