Since switching to AppcompatActivity, when the app is launched there is a long pause for the preview screen prior to the splash screen launching. The launcher activity theme is Theme.AppCompat.Light.NoActionBar and adding true only causes a black screen to appear instead of the drawable in android:windowBackground within the style but it still hangs for about 10 seconds before the splash screen appears. There is no real work done in the application class within onCreate so no idea what's causing the long pause. The Splash Activity appears after the long pause at the beginning and when degugging, the oncreate of the splash activity is not triggered until the 10 seconds is over. Thanks
Asked
Active
Viewed 328 times
0
-
Possible duplicate of [How do I make a splash screen?](http://stackoverflow.com/questions/5486789/how-do-i-make-a-splash-screen) – Viktor Yakunin Oct 28 '16 at 22:38
-
Use approach Branded Screen, the Splash Screen is the antipattern – Viktor Yakunin Oct 28 '16 at 22:39
-
http://antonioleiva.com/branded-launch-screen/ – Viktor Yakunin Oct 28 '16 at 22:40
1 Answers
0
It's not good how you start the thread of the splash activity. It blocks all the Ui elements. Try this instead https://github.com/alessandroargentieri/AuctionExample/blob/master/app/src/main/java/argentieri/alessandro/crossoverauction/SplashActivity.java

Alessandro Argentieri
- 2,901
- 3
- 32
- 62
-
Thanks for the response. I'm currently doing the same thing, I have a SplashActivity as well but there is a blank screen that appears for about 10 seconds before the splash activity appears. I use the same AppCompat theme as the one in your link as well but not sure why the screen appears before the Splash Activity? – Jaz Oct 28 '16 at 23:21
-
It seems the issue does not occur after created a signed release so not a huge issue. I discovered that the long pause was only present when I loaded the application and then entered an area of the app where the Volley library was utilized. If I moved the volley code or didn't enter that area of the app before restarting, the pause wasn't present. It took me a while to realize it was only occurring on development builds but glad to see it's at least not an issue for production. – Jaz Oct 31 '16 at 00:20