I think I am confused. If the entire Android UI is completely thread safe and the events are queued, the event should be processed one by one. I would like to know why an inconsistent state can be seen during the execution even if I do not start a new thread in my code.
G. Blake Meike於 2012年10月15日星期一UTC+8下午8時05分39秒寫道: > Lew is exactly correct. The entire Android UI is completely thread safe, > because it runs on a single thread. During execution of your program, you > may, from within the code, be able to see a state that is inconsistent. > That is only because you are observing that state from a partially > processed event. Each new even will observe consistent state. > > ... but the main point is that you don't need to worry: unless you > explicitly start a new thread, looper or asynctask, everything in the UI is > on a single thread. It is safe. > > G. Blake Meike > Marakana > > The second edition of Programming Android is now on-line: > http://shop.oreilly.com/product/0636920023005.do > -- 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

