Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Black Screen came when app start in phonegap in android before the splash screen?

Black screen came for 2 seconds when starting app in phonegap in android before the splash screen came. How to resolve this problem? I need splash screen immediately.

like image 559
user3323791 Avatar asked Mar 16 '14 10:03

user3323791


2 Answers

You need to create a new theme to the android app. Under "{Project}\res\values" create a new file "styles.xml" and put the contents of the attached imageenter image description here

In the AndroidManifest.xml add "android:theme="@style/Theme.MyAppTheme"" to the "application" tag

like image 193
George Avatar answered Nov 14 '22 23:11

George


Simply you can't.

That black screen is a sort of Android internal base screen that Android shows for your app while it fork a process in the Dalvik JVM and load your resources/classes. it happen for any Android app. it is not related to Phonegap. Android make this to give the user the impression of a "fast app launch" while it instead is still loading your code.

Anyway you can style that black screen to make it appear as near as possible to the theme of your app so the user have the impression the app is ready and launched but it is loading internal content.

You can read more about it here: http://cyrilmottier.com/2013/01/23/android-app-launching-made-gorgeous/

like image 31
Alex Avatar answered Nov 15 '22 00:11

Alex