Try using runOnUiThread(). Thanks
On Sun, Dec 18, 2011 at 5:08 PM, QuR <rainer.qu...@gmx.de> wrote: > Hello, > > how can I access the UI from a other thread? > > My scenario: > in my activity I create and start a thread, which continously has to > do various tasks in the background. On some of this tasks it is > necessary to update the UI. To do this I am calling a method in my > Task. The problem no is, that this method is called in the context of > the thread and that I am not allowed to access the UI controls. > How can I now synchronize with the UI thread to be allowed to update > the UI controls? > In C# there are things like "Dispatcher.Invoke(action)", but how do I > do this with Java/Android? > > Thanks for any help and hints! > > Regards > Rainer > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- Raghav Sood http://www.androidactivist.org/ - Author http://www.appaholics.in/ - Founder -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en