[android-developers] Re: running code immediately after activity is displayed

2009-07-22 Thread skink
Peter Jeffe wrote: > On Jul 22, 1:29 am, skink wrote: > > use MessageQueue.addIdleHandler() > > Very cool, thanks! So I guess this works since it only gets back to > the (now empty) message queue when it's completely done starting the > activity? > > yes, this is how it works -- Peter --

[android-developers] Re: running code immediately after activity is displayed

2009-07-22 Thread Peter Jeffe
On Jul 22, 9:24 am, Micah wrote: > If the code you are running takes long enough to noticeably block the > UI (ie: more than 200ms) then you should do it in another thread. > Allowing the user to see the UI but not interact with it (because your > app is doing some heavy lifting in the main threa

[android-developers] Re: running code immediately after activity is displayed

2009-07-22 Thread Micah
If the code you are running takes long enough to noticeably block the UI (ie: more than 200ms) then you should do it in another thread. Allowing the user to see the UI but not interact with it (because your app is doing some heavy lifting in the main thread) is just as bad of a user experience as

[android-developers] Re: running code immediately after activity is displayed

2009-07-22 Thread Peter Jeffe
On Jul 22, 1:29 am, skink wrote: > use MessageQueue.addIdleHandler() Very cool, thanks! So I guess this works since it only gets back to the (now empty) message queue when it's completely done starting the activity? -- Peter --~--~-~--~~~---~--~~ You received t

[android-developers] Re: running code immediately after activity is displayed

2009-07-21 Thread skink
On Jul 22, 3:51 am, Peter Jeffe wrote: > I want to run some init code immediately after my activity becomes > visible to the user, so that the main view can come up as soon as > possible and then the data can get filled in afterward. use MessageQueue.addIdleHandler() pskink --~--~-~--