It's just a shortcut:
public final void runOnUiThread(Runnable action) {
if (Thread.currentThread() != mUiThread) {
mHandler.post(action);
} else {
action.run();
}
}
to post a Runnable to the UI thread's handler.
-- Kostya
2011/5/27 Oceanblue <[email protected]>
> Thanks for the links. Your code clarifies things a lot.
>
> Thinking about Handler/HandlerThread made me wonder about something...
> Activity class provides a method called runOnUIThread(), which seems
> to me a very straight-forward way to execute commands emanating from
> other threads, on UI thread. Is there any idisadvantage of using this
> instead of Handler or HandlerThread?
>
>
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en