HELLS YEAH!
On Tue, Jul 30, 2013 at 3:27 PM, Filip Maj <[email protected]> wrote: > Best commit message evar! > > On 7/30/13 3:21 PM, "[email protected]" <[email protected]> wrote: > >>Updated Branches: >> refs/heads/master 7cbe8f584 -> 2bdc849c2 >> >> >>CB-3819: Implemented Feature >> >> >>Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo >>Commit: >>http://git-wip-us.apache.org/repos/asf/cordova-android/commit/2bdc849c >>Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/2bdc849c >>Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/2bdc849c >> >>Branch: refs/heads/master >>Commit: 2bdc849c2ba505d944f2b81fc02245fba9fbf204 >>Parents: 7cbe8f5 >>Author: Joe Bowser <[email protected]> >>Authored: Tue Jul 30 15:03:25 2013 -0700 >>Committer: Joe Bowser <[email protected]> >>Committed: Tue Jul 30 15:03:25 2013 -0700 >> >>---------------------------------------------------------------------- >> framework/src/org/apache/cordova/Config.java | 4 ++ >> .../src/org/apache/cordova/CordovaActivity.java | 65 ++++++++++++++------ >> .../src/org/apache/cordova/CordovaWebView.java | 1 + >> 3 files changed, 50 insertions(+), 20 deletions(-) >>---------------------------------------------------------------------- >> >> >>http://git-wip-us.apache.org/repos/asf/cordova-android/blob/2bdc849c/frame >>work/src/org/apache/cordova/Config.java >>---------------------------------------------------------------------- >>diff --git a/framework/src/org/apache/cordova/Config.java >>b/framework/src/org/apache/cordova/Config.java >>index 51f8f3f..716b795 100644 >>--- a/framework/src/org/apache/cordova/Config.java >>+++ b/framework/src/org/apache/cordova/Config.java >>@@ -136,6 +136,10 @@ public class Config { >> int value = xml.getAttributeIntValue(null, >>"value", 20000); >> action.getIntent().putExtra(name, value); >> } >>+ else if(name.equalsIgnoreCase("SplashScreenDelay")) { >>+ int value = xml.getAttributeIntValue(null, >>"value", 3000); >>+ action.getIntent().putExtra(name, value); >>+ } >> else if(name.equalsIgnoreCase("KeepRunning")) >> { >> boolean value = xml.getAttributeValue(null, >>"value").equals("true"); >> >>http://git-wip-us.apache.org/repos/asf/cordova-android/blob/2bdc849c/frame >>work/src/org/apache/cordova/CordovaActivity.java >>---------------------------------------------------------------------- >>diff --git a/framework/src/org/apache/cordova/CordovaActivity.java >>b/framework/src/org/apache/cordova/CordovaActivity.java >>index 685424c..82d97c9 100755 >>--- a/framework/src/org/apache/cordova/CordovaActivity.java >>+++ b/framework/src/org/apache/cordova/CordovaActivity.java >>@@ -391,6 +391,16 @@ public class CordovaActivity extends Activity >>implements CordovaInterface { >> this.init(); >> } >> >>+ this.splashscreenTime = >>this.getIntegerProperty("SplashScreenDelay", this.splashscreenTime); >>+ if(this.splashscreenTime > 0) >>+ { >>+ this.splashscreen = this.getIntegerProperty("SplashScreen", >>0); >>+ if(this.splashscreen != 0) >>+ { >>+ this.showSplashScreen(this.splashscreenTime); >>+ } >>+ } >>+ >> // Set backgroundColor >> this.backgroundColor = >>this.getIntegerProperty("BackgroundColor", Color.BLACK); >> this.root.setBackgroundColor(this.backgroundColor); >>@@ -401,9 +411,43 @@ public class CordovaActivity extends Activity >>implements CordovaInterface { >> // Then load the spinner >> this.loadSpinner(); >> >>- this.appView.loadUrl(url); >>+ //Load the correct splashscreen >>+ >>+ if(this.splashscreen != 0) >>+ { >>+ this.appView.loadUrl(url, this.splashscreenTime); >>+ } >>+ else >>+ { >>+ this.appView.loadUrl(url); >>+ } >> } >> >>+ /** >>+ * Load the url into the webview after waiting for period of time. >>+ * This is used to display the splashscreen for certain amount of >>time. >>+ * >>+ * @param url >>+ * @param time The number of ms to wait before loading >>webview >>+ */ >>+ public void loadUrl(final String url, int time) { >>+ >>+ this.splashscreenTime = time; >>+ this.loadUrl(url); >>+ >>+ /* >>+ // Init web view if not already done >>+ if (this.appView == null) { >>+ this.init(); >>+ } >>+ >>+ this.splashscreenTime = time; >>+ this.splashscreen = this.getIntegerProperty("SplashScreen", 0); >>+ this.showSplashScreen(this.splashscreenTime); >>+ this.appView.loadUrl(url, time); >>+ */ >>+ } >>+ >> /* >> * Load the spinner >> */ >>@@ -437,25 +481,6 @@ public class CordovaActivity extends Activity >>implements CordovaInterface { >> } >> } >> >>- /** >>- * Load the url into the webview after waiting for period of time. >>- * This is used to display the splashscreen for certain amount of >>time. >>- * >>- * @param url >>- * @param time The number of ms to wait before loading >>webview >>- */ >>- public void loadUrl(final String url, int time) { >>- >>- // Init web view if not already done >>- if (this.appView == null) { >>- this.init(); >>- } >>- >>- this.splashscreenTime = time; >>- this.splashscreen = this.getIntegerProperty("SplashScreen", 0); >>- this.showSplashScreen(this.splashscreenTime); >>- this.appView.loadUrl(url, time); >>- } >> >> /** >> * Cancel loadUrl before it has been loaded. >> >>http://git-wip-us.apache.org/repos/asf/cordova-android/blob/2bdc849c/frame >>work/src/org/apache/cordova/CordovaWebView.java >>---------------------------------------------------------------------- >>diff --git a/framework/src/org/apache/cordova/CordovaWebView.java >>b/framework/src/org/apache/cordova/CordovaWebView.java >>index 45d39ce..f798794 100755 >>--- a/framework/src/org/apache/cordova/CordovaWebView.java >>+++ b/framework/src/org/apache/cordova/CordovaWebView.java >>@@ -23,6 +23,7 @@ import java.lang.reflect.InvocationTargetException; >> import java.lang.reflect.Method; >> import java.util.ArrayList; >> import java.util.HashMap; >>+import java.util.Locale; >> >> import org.apache.cordova.Config; >> import org.apache.cordova.CordovaInterface; >> >
