[android-developers] Re: changing listview content in separate thread issue

2011-07-28 Thread Wall-E
Doug, I currently do send a broadcast that notifies that data has been changed which in the receiver I notify the ListView/Adapter but obviously that didn't work since I still get the IllegalStateException. I'm guessing that it's critical that the listview be immediately notified and the broadcas

[android-developers] Re: changing listview content in separate thread issue

2011-07-28 Thread Doug
On Jul 27, 7:07 am, Wall-E wrote: > If anybody has any ideas on how to deal with this situation where the > content of a listview is changing in another thread where I don't have > access to the listview and need to notify the listview that the > content has changed I'd appreciate your input. The

[android-developers] Re: changing listview content in separate thread issue

2011-07-27 Thread Wall-E
Abishek & gjs, thanks for your suggestions. Abishek, are you sure it's necessary to do what you suggested. Isn't the whole point of calling getMainLooper() so that you can set the thread for the handler? So assuming that you're right, do you know if the constructor for the IntentService is exec

[android-developers] Re: changing listview content in separate thread issue

2011-07-26 Thread Abhishek Akhani
Your handler object should be created in main UI thread... So write this line in Main UI thread Handler handler = new Handler(getMainLooper()); and post the message from another thread -- You received this message because you are subscribed to the Google Groups "Android Developers" gro

[android-developers] Re: changing listview content in separate thread issue

2011-07-25 Thread gjs
Hi, Yes that looks ok, here's some more details http://android-developers.blogspot.com/2009/05/painless-threading.html Regards On Jul 26, 8:55 am, Wall-E wrote: > I received an error saying I was changing the content of my listview > in a different thread than the main UI thread which I am.  I