re: Android: Simple way to implement a SplashScreen in your app VIEW POST


I prefer doing it without an Activity: create a style for the splash screen and set it as the main activity's style. Then, on the activity's onCreate, set the theme to the default theme and you're done. This immediately displays the splash screen (without that white screen that is sometimes displayed) and eliminates the need for an extra activity just to show the splash screen. However, it has the disadvantage of showing the splash screen again if you navigate to another activity and the main activity gets destroyed (for instance, due to resource constraints).
Regardless, since I've been using a single activity - multiple fragments architecture, the disadvantage doesn't really bother me :)


Looks good because of your architecture but what if you wanna do an animation with the image? or something like that?


You can add references to animations in a theme. You could, for example, create an animation-list with the animation you want and set it as the theme's windowBackground.

code of conduct - report abuse