0

If the app isn't already stored in memory and it needs to execute the onCreate method ( after a kill ), I want to show a layout ( essentially an image ) for some seconds when the app is launched. Then I want to load the basic layout of the app.

Something idea? can someone post some code?

thank to everyone

lory105
  • 6,112
  • 4
  • 31
  • 40

1 Answers1

2

I think, you are looking for Splash Screen.

Check this below link.

http://p-xr.com/android-tutorial-how-to-make-a-basic-splash-screen/

The following code will show you how to create a basic splashscreen for your Android application that will stay for 5 seconds. If we don't want to wait we can tap the screen to go directly to the next Activity. Source project is on the bottom of the tutorial.

Chirag
  • 56,621
  • 29
  • 151
  • 198
  • 1
    but is the splash screen display every time that the app is launched, or only when app isn't load in memory? – lory105 Aug 21 '12 at 10:00
  • 1
    every time after a kill the splash screen will be invoked. If you havent finished your activity the splash screen will not be loaded instead the application starts from the place where you left previously – G_S Aug 21 '12 at 10:02
  • Every time when you start your application. – Chirag Aug 21 '12 at 10:04
  • 1
    While this may theoretically answer the question, [it would be preferable](http://meta.stackexchange.com/q/8259) to include the essential parts of the answer here, and provide the link for reference. – Bill the Lizard Aug 21 '12 at 11:00