Thanks Mark. What is the difference of using "runOnUiThread()" and Handler? When application is running, it will create a main thread. using post will send a message to thread/message queue. does android have a dedicated thread for UI?
Thanks! On Jan 15, 5:55 pm, Mark Murphy <[email protected]> wrote: > cindy wrote: > > Mark, thank you for the reply. I will look into debug. > > > I guess it is caused by thread issue. my application has thread to > > update UI, at the same time phone itself is trying to update UI. > > > In Swing UI, we should call InvokeLater()to update already relized UI. > > What would be a "thread safe" way to update android UI? > > You have many options, including: > > -- Use a Handler > > -- Use View#post() or View#postDelayed() > > -- Use Activity#runOnUiThread() > > The latter options most closely resemble invokeLater(). > > -- > Mark Murphy (a Commons Guy)http://commonsware.com > _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

