Use the ViewFlipper. onCreate will be run once.After which the UI will be displayed.
On Fri, Feb 20, 2009 at 6:19 PM, guptha <gjango...@gmail.com> wrote: > > > Can we use Handler to accomplish this task. > > > > > On Feb 19, 11:12 pm, "nEx.Software" <justin.shapc...@gmail.com> wrote: > > I also think the Thread.sleep(500); is stopping the redraw from > > happening. > > > > On Feb 19, 11:06 am, "nEx.Software" <justin.shapc...@gmail.com> wrote: > > > > > I think onCreate runs all the way through before displaying the UI. > > > I just tried this and found it to be the case. > > > > > On Feb 18, 9:37 pm, guptha <gjango...@gmail.com> wrote: > > > > > > hi friends, > > > > I 'm beginner in Android ,To start with i was asked to do a simple > > > > task ,i need to make blue and red screen appear on the screen > > > > alternatively , > > > > to achieve this i wrote two layout files > > > > 1. main.xml -- for to display red screen > > > > 2. sub1.xml -- for to display blue screen > > > > > > In oncreate() i wrote > > > > > > for(int i=0;i<20;i++) > > > > { > > > > setContentView(R.layout.main); > > > > try > > > > { > > > > Thread.sleep(500); > > > > }catch(Exception e){} > > > > setContentView(R.layout.sub1); > > > > } > > > > > > but this doesn't work ,why ? > > > > Please help to understand the concept > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---