The UI is only updated after the onCreate method finishes.... You may want to look at using ASyncTask to do what you want to do...
---------------------------------------------------------------------- There are only 10 types of people in the world... Those who know binary and those who don't. ---------------------------------------------------------------------- On Fri, Mar 19, 2010 at 12:55 AM, arv <[email protected]> wrote: > Hi all, > > I write this code to change screen after some duration so it seems > like a splash but it is not working fin can u help me > > public void onCreate(Bundle savedInstanceState) > { > super.onCreate(savedInstanceState); > setContentView(R.layout.splash); > try > { > Log.i("info", "start"); > Thread.sleep(2000); > } > catch(Exception exc) > { > Log.i("info", "start exception"); > } > setContentView(R.layout.main); > > initControls(); > } > > -- > You received this message because you are subscribed to the Google > Groups "Android Beginners" group. > > NEW! Try asking and tagging your question on Stack Overflow at > http://stackoverflow.com/questions/tagged/android > > To unsubscribe from this group, send email to > [email protected]<android-beginners%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-beginners?hl=en > > To unsubscribe from this group, send email to android-beginners+ > unsubscribegooglegroups.com or reply to this email with the words "REMOVE > ME" as the subject. > -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en To unsubscribe from this group, send email to android-beginners+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

