CB-1126: Splashscreen

This commit is contained in:
Simon MacDonald 2012-09-18 11:49:11 -04:00
parent d181d89dd2
commit 451688a12e
2 changed files with 8 additions and 3 deletions

View File

@ -50,6 +50,7 @@
android:hardwareAccelerated="true" android:hardwareAccelerated="true"
android:debuggable="true"> android:debuggable="true">
<activity android:name="__ACTIVITY__" android:label="@string/app_name" <activity android:name="__ACTIVITY__" android:label="@string/app_name"
android:theme="@android:style/Theme.Black.NoTitleBar"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale"> android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />

View File

@ -406,6 +406,8 @@ public class DroidGap extends Activity implements CordovaInterface {
} }
this.splashscreenTime = time; this.splashscreenTime = time;
this.splashscreen = this.getIntegerProperty("splashscreen", 0);
this.showSplashScreen(this.splashscreenTime);
this.appView.loadUrl(url, time); this.appView.loadUrl(url, time);
} }
@ -996,7 +998,6 @@ public class DroidGap extends Activity implements CordovaInterface {
this.runOnUiThread(runnable); this.runOnUiThread(runnable);
} }
@Override @Override
public boolean onKeyUp(int keyCode, KeyEvent event) public boolean onKeyUp(int keyCode, KeyEvent event)
{ {
@ -1024,8 +1025,11 @@ public class DroidGap extends Activity implements CordovaInterface {
this.removeSplashScreen(); this.removeSplashScreen();
} }
else { else {
this.splashscreen = this.getIntegerProperty("splashscreen", 0); // If the splash dialog is showing don't try to show it again
this.showSplashScreen(this.splashscreenTime); if (this.splashDialog != null && !this.splashDialog.isShowing()) {
this.splashscreen = this.getIntegerProperty("splashscreen", 0);
this.showSplashScreen(this.splashscreenTime);
}
} }
} }
else if ("spinner".equals(id)) { else if ("spinner".equals(id)) {