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)