android splash screen/ loading screen

jfisk picture jfisk · Aug 21, 2010 · Viewed 14.9k times · Source

I have a splash screen/loading screen that has .setVisibility() to GONE right after the draw call of my large bitmap is completed. The problem is the splash screen takes a bit to popup which i believe is due to the main activity booting up and doing CPU intensive applications on first run. Is there a way to get my splash screen displayed ASAP? Would it be ok if i had it in a different thread maybe? The splash screen is just a bitmap with a progressBar right below it. My layout is xml based so i cant see myself using setContentView. Thanks.

Answer

Paresh Mayani picture Paresh Mayani · Aug 21, 2010

Would it be ok if i had it in a different thread maybe?

In android, when we build an application we may need to display a splash screen ( welcome screen ) for users to intimate some thing & do some other process in background ( like fetching data from DB, Parsing XML , etc.. ), so for that it is preferrable to implement it in a different thread.

I have referred the example on www.androidpeople.com site for the SPLASH SCREEN, you may also Have a look at this example of SPLASH SCREEN .