[android-developers] Re: how to update list

2009-02-06 Thread Emmanuel
runOnUiThread is your friend for this situation : http://code.google.com/android/reference/android/app/Activity.html#runOnUiThread(java.lang.Runnable) Emmanuel http://androidblogger.blogspot.com/ On Feb 4, 7:04 pm, cindy wrote: > I figure out the problem. > > You can't change any UI in the thr

[android-developers] Re: how to update list

2009-02-04 Thread cindy
I figure out the problem. You can't change any UI in the thread your create. Android require you to update UI in UI thread. On Feb 3, 11:27 pm, cindy wrote: > I implemented the async incoming data on a separate thread which adds > the items to a ArrayList that is connected to the view through m

[android-developers] Re: how to update list

2009-02-04 Thread for android
In your adapter class u will be having the constructor something like this: public class MyAdapter extends BaseAdapter{ private List myList; public MyAdapter(Context context, int rowResID, List myList) this.myList= myList;

[android-developers] Re: how to update list

2009-02-03 Thread cindy
I implemented the async incoming data on a separate thread which adds the items to a ArrayList that is connected to the view through my custom adapter (inherits BaseAdapter). But when I modified the ArrayList, the application crashes. Have you have the same problem? On Feb 3, 5:03 pm, Emmanuel

[android-developers] Re: how to update list

2009-02-03 Thread for android
notifyDataSetChanged(). On Wed, Feb 4, 2009 at 6:33 AM, Emmanuel wrote: > > Do you mean the data from your adapter has changed, and you want to > update your list from this ? > > To achieve this result, I create the adapter from the new data, and > reset it to the list. > There should be another

[android-developers] Re: how to update list

2009-02-03 Thread Emmanuel
Do you mean the data from your adapter has changed, and you want to update your list from this ? To achieve this result, I create the adapter from the new data, and reset it to the list. There should be another cleaner method, but this is works for me ! Emmanuel http://androidblogger.blogspot.co