I know that this question is pretty old, and the OP may not need it anymore. But I just want to add this answer to help people who may need this to archive a splash screen.
Answer (only work on Android Oreo or greater versions)
Actually, in the newer version of Android (after Android Oreo), it already support built-in splash screen implement. That means you don t need to create extra activity to do that. You only need a drawable resource file for display.
Using this way is faster to your splash screen and soon show your content just after the initialization. But please note that this only work on Android Oreo or greater versions. On the previous version, it will show white instead of your splash screen (at least I think so).
You need this line in your AppTheme style:
<item name="android:windowSplashscreenContent">@drawable/YOUR_SPLASH_SCREEN_DRAWABLE</item>
This is a full example:
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<!-- Set your splash screen here, it accept a resource from drawable directory-->
<item name="android:windowSplashscreenContent" tools:targetApi="o">@drawable/splash_screen</item>
</style>
Reference
And for more informations about this attribute, see the official reference here: https://developer.android.com/reference/android/R.attr#windowSplashscreenContent
As it said, it is added in API level 26.
And a short extract of what it said:
Reference to a drawable to be used as the splash screen content of the window. This drawable will be placed on top of the windowBackground
with its bounds inset by the system bars. If the drawable should not be inset by the system bars, use a fullscreen theme.
Note that even if no splashscreen content is set on the theme, the system may still show a splash screen using the other attributes on the theme, like the windowBackground
.