[android-developers] Re: application will crash when G1 changed to landscape display

2009-01-16 Thread cindy
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 wrote: > cindy w

[android-developers] Re: application will crash when G1 changed to landscape display

2009-01-15 Thread Mark Murphy
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

[android-developers] Re: application will crash when G1 changed to landscape display

2009-01-15 Thread cindy
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

[android-developers] Re: application will crash when G1 changed to landscape display

2009-01-15 Thread Mark Murphy
cindy wrote: > When my application used keybload, the display will change to > landscape. when I close the keyboard, and change the phone to regular > display. sometimes, my application will crash. What does the error log tell you? There should be a Java exception traceback in there corresponding