I’m using Phonegap + Jquery Mobile, when I click the icon on the phone, it takes a long time to show the index.html, now I added a splash screen, it shows the splash screen then a black screen before it loads the index.html. the index.html is just very small with cordova.js, and the jquery mobile js.
how do I correct this?
config.xml
<?xml version="1.0" encoding="UTF-8" ?>
<widget xmlns = "http://www.w3.org/ns/widgets"
xmlns:gap = "http://phonegap.com/ns/1.0"
id = "com.phonegap.test222"
version = "1.0.21">
<name>Test App</name>
<description>
Beta Saystyle
</description>
<author href="http://example.com" email="example@example.com">
Lester Jan Pearson
</author>
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/accelerate_interpolator"
android:fromAlpha="0.0" android:toAlpha="1.0"
android:duration="300" />
<icon src="images/4.png" />
<gap:splash src="images/mohawk.png" />
</widget>
If you are using Phonegap 1.7 or better take a look at the changes I did the to the splash screen.
http://simonmacdonald.blogspot.com/2012/04/phonegap-android-splashscreen-just-got.html
Now your page loads in the background while the splash screen is being shown. As well you can call a method to hide the splash screen once you get to deviceready so it isn’t shown any longer that it needs to be.