Splash Screen in Android
When you start any android app most probably you’ll see a blank screen before app ‘s data is loaded and app is ready for work.
A splash screen usually appears while a game or program is launching to fill this gap. So the delay of the splash screen depends on the start up time of the application. And the solution should not let the user wait more.
There are multiple ways to create a splash screen in Android, but here I suggest the one that I used for my app.
First, you need to add a new style in style.xml:
Where splash_screen is your screen images (e.g. PNG files). Instead of using @android:style/Theme.DeviceDefault.Light.NoActionBar you can use any other theme as a parent.
Second, next you need to modify AndroidManifest.xml — add android:theme=”@style/splashScreenTheme” to your main activity:
And one more thing — for @drawable/splash_screen you probably should use 9 patch image to be sure that it’s stretches good for all screen resolutions.
I would also like to share Android splash screen sizes for ldpi,mdpi, hdpi, xhdpi displays:
LDPI:
* Portrait: 200 x 320 px
* Landscape: 320 x 200 px
MDPI:
* Portrait: 320 x 480 px
* Landscape: 480 x 320 px
HDPI:
* Portrait: 480 x 800 px
* Landscape: 800 x 480 px
XHDPI:
* Portrait: 720 x 1280 px
* Landscape: 1280 x 720 px
XXHDPI:
* Portrait: 960 x 1600 px
* Landscape: 1600 x 960 px
XXXHDPI:
* Portrait: 1280 x 1920 px
* Landscape: 1920 x 1280 px
That’s all folks! Thank you!
Tools and information: