You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by da...@apache.org on 2016/01/18 09:44:42 UTC
cordova-plugin-splashscreen git commit: CB-8396 Add
AutoHideSplashScreen logic to Android's Splashscreen
Repository: cordova-plugin-splashscreen
Updated Branches:
refs/heads/master eada9a6ac -> 7a12204ba
CB-8396 Add AutoHideSplashScreen logic to Android's Splashscreen
Also initializing the splashscreen image irrespective of firstShow because the splashscreen could be shown manually via navigator.splashscreen.show(); after exiting the app using BackButton or via navigator.app.exitApp();
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/commit/7a12204b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/tree/7a12204b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/diff/7a12204b
Branch: refs/heads/master
Commit: 7a12204ba9c49d8b23cf67634e2d69890944274a
Parents: eada9a6
Author: daserge <v-...@microsoft.com>
Authored: Fri Jan 15 11:54:21 2016 +0300
Committer: daserge <v-...@microsoft.com>
Committed: Mon Jan 18 11:36:21 2016 +0300
----------------------------------------------------------------------
src/android/SplashScreen.java | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/7a12204b/src/android/SplashScreen.java
----------------------------------------------------------------------
diff --git a/src/android/SplashScreen.java b/src/android/SplashScreen.java
index 7f91147..7e27d49 100644
--- a/src/android/SplashScreen.java
+++ b/src/android/SplashScreen.java
@@ -73,7 +73,7 @@ public class SplashScreen extends CordovaPlugin {
@Override
protected void pluginInitialize() {
- if (HAS_BUILT_IN_SPLASH_SCREEN || !firstShow) {
+ if (HAS_BUILT_IN_SPLASH_SCREEN) {
return;
}
// Make WebView invisible while loading URL
@@ -93,12 +93,15 @@ public class SplashScreen extends CordovaPlugin {
// Save initial orientation.
orientation = cordova.getActivity().getResources().getConfiguration().orientation;
+ if (firstShow) {
+ boolean autoHide = preferences.getBoolean("AutoHideSplashScreen", true);
+ loadSpinner();
+ showSplashScreen(autoHide);
+ }
+
if (preferences.getBoolean("SplashShowOnlyFirstTime", true)) {
firstShow = false;
}
-
- loadSpinner();
- showSplashScreen(true);
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org