diff --git a/README.md b/README.md
index 79ac425..fc1993a 100644
--- a/README.md
+++ b/README.md
@@ -129,6 +129,8 @@ projectRoot
```
+Note also that this value used to be seconds, and not milliseconds, so values less than 30 will still be treated as seconds. ( Consider this a deprecated patch that will disapear in some future version. )
+
- `FadeSplashScreen` (boolean, defaults to `true`): Set to `false` to
prevent the splash screen from fading in and out when its display
state changes.
@@ -137,15 +139,13 @@ projectRoot
```
-- `FadeSplashScreenDuration` (float, defaults to `3000`): Specifies the
+- `FadeSplashScreenDuration` (float, defaults to `500`): Specifies the
number of milliseconds for the splash screen fade effect to execute.
```xml
-
+
```
-Note also that this value used to be seconds, and not milliseconds, so values less than 30 will still be treated as seconds. ( Consider this a deprecated patch that will disapear in some future version. )
-
_Note_: `FadeSplashScreenDuration` is included into `SplashScreenDelay`, for example if you have `` and `` defined in `config.xml`:
- 00:00 - splashscreen is shown
@@ -172,16 +172,13 @@ window.setTimeout(function () {
### Android Quirks
-In your `config.xml`, you need to add the following preferences:
+In your `config.xml`, you can add the following preferences:
```xml
-
```
-The first parameter represents how long the splashscreen will appear in milliseconds. It defaults to 3000 ms.
-
"SplashMaintainAspectRatio" preference is optional. If set to true, splash screen drawable is not stretched to fit screen, but instead simply "covers" the screen, like CSS "background-size:cover". This is very useful when splash screen images cannot be distorted in any way, for example when they contain scenery or text. This setting works best with images that have large margins (safe areas) that can be safely cropped on screens with different aspect ratios.
The plugin reloads splash drawable whenever orientation changes, so you can specify different drawables for portrait and landscape orientations.
@@ -213,13 +210,17 @@ __Note__: `SplashScreen` value should be absolute in order to work in a sub-page
- `SplashScreenSpinnerColor` (string, defaults to system accent color): hash, rgb notation or CSS color name.
-
-
-
+```xml
+
+
+
+```
- `SplashScreenBackgroundColor` (string, defaults to #464646): hex notation.
-
+```xml
+
+```
## Methods
diff --git a/src/android/SplashScreen.java b/src/android/SplashScreen.java
index d9ac66a..7f5cedc 100644
--- a/src/android/SplashScreen.java
+++ b/src/android/SplashScreen.java
@@ -52,6 +52,7 @@ public class SplashScreen extends CordovaPlugin {
// Enable functionality only if running on 4.x.x.
private static final boolean HAS_BUILT_IN_SPLASH_SCREEN = Integer.valueOf(CordovaWebView.CORDOVA_VERSION.split("\\.")[0]) < 4;
private static final int DEFAULT_SPLASHSCREEN_DURATION = 3000;
+ private static final int DEFAULT_FADE_DURATION = 500;
private static Dialog splashDialog;
private static ProgressDialog spinnerDialog;
private static boolean firstShow = true;
@@ -117,7 +118,7 @@ public class SplashScreen extends CordovaPlugin {
private int getFadeDuration () {
int fadeSplashScreenDuration = preferences.getBoolean("FadeSplashScreen", true) ?
- preferences.getInteger("FadeSplashScreenDuration", DEFAULT_SPLASHSCREEN_DURATION) : 0;
+ preferences.getInteger("FadeSplashScreenDuration", DEFAULT_FADE_DURATION) : 0;
if (fadeSplashScreenDuration < 30) {
// [CB-9750] This value used to be in decimal seconds, so we will assume that if someone specifies 10
diff --git a/src/ios/CDVSplashScreen.m b/src/ios/CDVSplashScreen.m
index 1d7b955..448a23f 100644
--- a/src/ios/CDVSplashScreen.m
+++ b/src/ios/CDVSplashScreen.m
@@ -23,6 +23,7 @@
#import "CDVViewController+SplashScreen.h"
#define kSplashScreenDurationDefault 3000.0f
+#define kFadeDurationDefault 500.0f
@implementation CDVSplashScreen
@@ -390,7 +391,7 @@
id fadeSplashScreenValue = [self.commandDelegate.settings objectForKey:[@"FadeSplashScreen" lowercaseString]];
id fadeSplashScreenDuration = [self.commandDelegate.settings objectForKey:[@"FadeSplashScreenDuration" lowercaseString]];
- float fadeDuration = fadeSplashScreenDuration == nil ? kSplashScreenDurationDefault : [fadeSplashScreenDuration floatValue];
+ float fadeDuration = fadeSplashScreenDuration == nil ? kFadeDurationDefault : [fadeSplashScreenDuration floatValue];
id splashDurationString = [self.commandDelegate.settings objectForKey: [@"SplashScreenDelay" lowercaseString]];
float splashDuration = splashDurationString == nil ? kSplashScreenDurationDefault : [splashDurationString floatValue];