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 <[email protected]> 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 [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
-~----------~----~----~----~------~----~------~--~---

Reply via email to