From 39d32bcb5b98495db1f18e2d28b6eccdef4a6264 Mon Sep 17 00:00:00 2001 From: Joe Bowser Date: Wed, 11 Sep 2013 15:02:00 -0700 Subject: [PATCH] CB-4620: Throwing this over the fence, since there is a problem actually in the wild here --- bin/templates/project/Activity.java | 3 ++- framework/src/org/apache/cordova/CordovaActivity.java | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/bin/templates/project/Activity.java b/bin/templates/project/Activity.java index c255e4c9..00248b7d 100644 --- a/bin/templates/project/Activity.java +++ b/bin/templates/project/Activity.java @@ -22,12 +22,13 @@ package __ID__; import android.os.Bundle; import org.apache.cordova.*; -public class __ACTIVITY__ extends DroidGap +public class __ACTIVITY__ extends CordovaActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + super.init(); // Set by in config.xml super.loadUrl(Config.getStartUrl()); //super.loadUrl("file:///android_asset/www/index.html") diff --git a/framework/src/org/apache/cordova/CordovaActivity.java b/framework/src/org/apache/cordova/CordovaActivity.java index d9b07e20..377c8fd6 100755 --- a/framework/src/org/apache/cordova/CordovaActivity.java +++ b/framework/src/org/apache/cordova/CordovaActivity.java @@ -413,9 +413,12 @@ public class CordovaActivity extends Activity implements CordovaInterface { // If keepRunning this.keepRunning = this.getBooleanProperty("KeepRunning", true); - // Then load the spinner - this.loadSpinner(); - + //Check if the view is attached to anything + if(appView.getParent() != null) + { + // Then load the spinner + this.loadSpinner(); + } //Load the correct splashscreen if(this.splashscreen != 0)