Updated Branches:
  refs/heads/master d181d89dd -> 451688a12

CB-1126: Splashscreen


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/commit/451688a1
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/451688a1
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/451688a1

Branch: refs/heads/master
Commit: 451688a12e1eb43303601be357d9c40fd4cf1ce5
Parents: d181d89
Author: Simon MacDonald <simon.macdon...@gmail.com>
Authored: Tue Sep 18 11:49:11 2012 -0400
Committer: Simon MacDonald <simon.macdon...@gmail.com>
Committed: Tue Sep 18 11:49:11 2012 -0400

----------------------------------------------------------------------
 bin/templates/project/AndroidManifest.xml      |    1 +
 framework/src/org/apache/cordova/DroidGap.java |   10 +++++++---
 2 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/451688a1/bin/templates/project/AndroidManifest.xml
----------------------------------------------------------------------
diff --git a/bin/templates/project/AndroidManifest.xml 
b/bin/templates/project/AndroidManifest.xml
index a243089..090c41e 100644
--- a/bin/templates/project/AndroidManifest.xml
+++ b/bin/templates/project/AndroidManifest.xml
@@ -50,6 +50,7 @@
         android:hardwareAccelerated="true"
         android:debuggable="true">
         <activity android:name="__ACTIVITY__" android:label="@string/app_name"
+                android:theme="@android:style/Theme.Black.NoTitleBar"
                 
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/451688a1/framework/src/org/apache/cordova/DroidGap.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/DroidGap.java 
b/framework/src/org/apache/cordova/DroidGap.java
index 9827ed5..0fe5b8a 100755
--- a/framework/src/org/apache/cordova/DroidGap.java
+++ b/framework/src/org/apache/cordova/DroidGap.java
@@ -406,6 +406,8 @@ public class DroidGap extends Activity implements 
CordovaInterface {
         }
 
         this.splashscreenTime = time;
+        this.splashscreen = this.getIntegerProperty("splashscreen", 0);
+        this.showSplashScreen(this.splashscreenTime);
         this.appView.loadUrl(url, time);
     }
 
@@ -996,7 +998,6 @@ public class DroidGap extends Activity implements 
CordovaInterface {
         this.runOnUiThread(runnable);
     }
 
-
     @Override
     public boolean onKeyUp(int keyCode, KeyEvent event)
     {
@@ -1024,8 +1025,11 @@ public class DroidGap extends Activity implements 
CordovaInterface {
                 this.removeSplashScreen();
             }
             else {
-                this.splashscreen = this.getIntegerProperty("splashscreen", 0);
-                this.showSplashScreen(this.splashscreenTime);
+                // If the splash dialog is showing don't try to show it again
+                if (this.splashDialog != null && 
!this.splashDialog.isShowing()) {
+                       this.splashscreen = 
this.getIntegerProperty("splashscreen", 0);
+                       this.showSplashScreen(this.splashscreenTime);
+                }
             }
         }
         else if ("spinner".equals(id)) {

Reply via email to