Search code examples
androidandroid-activitysplash-screen

How get rig of the starting non-seen activity?


I have an app where I used the dark theme. I have also added a splash screen where I have added an animation. The background of the SplashActivity is white. When I first start the app, I get a dark screen and then the splash screen is displayed. How to get rid of that dark screen and see directly the splash screen? Thanks


Solution

  • Its related to Cold Start. It happens when your app starts for the first time as explained in the android documentation. However to deal with it I prefer the solution of having background drawable and set it to app theme if your Splash screen is static but in your case as you are using animations you need to use mixture of both techniques i.e. setting the splash screen theme as drawable which is loaded during cold start and later on when it finishes you render your animated stuff.