Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(splash): Update splashscreen config preferences #1348

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion www/docs/en/dev/config_ref/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -328,12 +328,15 @@ AndroidGradlePluginVersion<br/>{% cdv_vartype semver %} {% cdv_platform android
AndroidXAppCompatVersion<br/>{% cdv_vartype semver %} {% cdv_platform android %} | *Default: [Dependent on cordova-android Version][android-api-level-support]* <br/> Overrides Android App Compat library version.
AndroidXWebKitVersion<br/>{% cdv_vartype semver %} {% cdv_platform android %} | *Default: [Dependent on cordova-android Version][android-api-level-support]* <br/>Overrides Android WebKit library version.
AppendUserAgent<br/>{% cdv_vartype string %} {% cdv_platform android %} {% cdv_platform ios %} | If set, the value will append to the end of old UserAgent of webview. When using with OverrideUserAgent, this value will be ignored.
BackgroundColor<br/>{% cdv_vartype string %} {% cdv_platform android %} {% cdv_platform ios %} | Sets the app's background color. Supports a four-byte hex value, with the first byte representing the alpha channel, and standard RGB values for the following three bytes. <br/>__Note__: `transparent` value will set the application tile background to the accent color on Windows.
AutoHideSplashScreen<br/> {% cdv_vartype boolean %} {% cdv_platform android %} {% cdv_platform ios %} | *Default: true* <br/> Indicates whether to hide splash screen automatically or not. The splash screen is hidden after the amount of time specified in the `SplashScreenDelay` preference.
BackgroundColor<br/>{% cdv_vartype string %} {% cdv_platform android %} {% cdv_platform ios %} | Sets the app's background color. Supports a four-byte hex value, with the first byte representing the alpha channel, and standard RGB values for the following three bytes.
dpogue marked this conversation as resolved.
Show resolved Hide resolved
CordovaWebViewEngine<br/>{% cdv_vartype string %} {% cdv_platform ios %} | *Default: CDVWebViewEngine* <br/> This sets the WebView engine plugin to be used to render the host app. The plugin must conform to the CDVWebViewEngineProtocol protocol. The 'value' here should match the 'feature' name of the WebView engine plugin that is installed. This preference usually would be set by the WebView engine plugin that is installed, automatically.
DefaultVolumeStream<br/>{% cdv_vartype string %} {% cdv_platform android %} | *Default: default* <br/> Added in cordova-android 3.7.0, This preference sets which volume the hardware volume buttons link to. By default this is "call" for phones and "media" for tablets. Set this to "media" to have your app's volume buttons always change the media volume. Note that when using Cordova's media plugin, the volume buttons will dynamically change to controlling the media volume when any Media objects are active.
DisallowOverscroll<br/>{% cdv_vartype boolean %} {% cdv_platform ios %} {% cdv_platform android %} | *Default: false* <br/> Set to **true** if you don't want the interface to display any feedback when users scroll past the beginning or end of content. On iOS, overscroll gestures cause content to bounce back to its original position. on Android, they produce a more subtle glowing effect along the top or bottom edge of the content. <br/>
EnableViewportScale<br/>{% cdv_vartype boolean %} {% cdv_platform ios %} | *Default: false* <br/> Set to true to allow a viewport meta tag to either disable or restrict the range of user scaling, which is enabled by default. Place a viewport such as the following in the HTML to disable scaling and fit content flexibly within the rendering WebView: <br/> ```<meta name='viewport' content='width=device-width, initial-scale=1, user-scalable=no' />```
ErrorUrl<br/>{% cdv_vartype url %} {% cdv_platform android %} {% cdv_platform ios %} | *Default: null* <br/>When this preference is set, the application will display the specified local page upon encountering an error. Additionally, if this preference is set, the Android system will suppress the default dialog titled "Application Error".
FadeSplashScreen<br/>{% cdv_vartype boolean %} {% cdv_platform android %} | *Default: true* <br/> Controls the ability of the fade in and out of the splash screen. <br/> For Android, it controls only the fade out.
FadeSplashScreenDuration<br/>{% cdv_vartype float %} {% cdv_platform android %} {% cdv_platform ios %} | *Default: 500* (Android), *250* (iOS) <br/>Time in milliseconds to fade out the splashscreen.
FullScreen<br/>{% cdv_vartype boolean %} {% cdv_platform android %} | *Default: false* <br/> Allows you to hide the status bar at the top of the screen. <br/> __Note__: Recommended platform-agnostic way to achieve this is to use the [StatusBar plugin][statusbar_plugin].
GapBetweenPages<br/>{% cdv_vartype float %} {% cdv_platform ios %} | *Default: 0* <br/> The size of the gap, in points, between pages.
GradlePluginGoogleServicesEnabled<br/>{% cdv_vartype boolean %} {% cdv_platform android %} | *Default: false* <br/> Set to true to enable the Google Services Gradle plugin.
Expand All @@ -359,6 +362,8 @@ PreferredContentMode<br/>{% cdv_vartype string %} {% cdv_platform ios %} | *Defa
InAppBrowserStatusBarStyle<br/>{% cdv_vartype string %} {% cdv_platform ios %} | *Default: default* <br/> Set text color style of the StatusBar for InAppBrowser for iOS. Valid values are: `lightcontent` and `default`.
SetFullscreen<br/>{% cdv_vartype boolean %} {% cdv_platform android %} | *Default: false* <br/> Same as the Fullscreen parameter in the global configuration of this xml file. This Android-specific element is deprecated in favor of the global Fullscreen element, and will be removed in a future version.
ShowTitle<br/>{% cdv_vartype boolean %} {% cdv_platform android %} | *Default: false* <br/> Show the title at the top of the screen.
SplashScreenBackgroundColor<br/>{% cdv_vartype string %} {% cdv_platform android %} {% cdv_platform ios %} | Sets the app's splashscreen background color. Supports a four-byte hex value, with the first byte representing the alpha channel, and standard RGB values for the following three bytes.
SplashScreenDelay<br/>{% cdv_vartype float %} {% cdv_platform android %} {% cdv_platform ios %} | *Default: 0* <br/> Amount of time in milliseconds to wait before automatically hide splash screen.
Suppresses3DTouchGesture<br/>{% cdv_vartype boolean %} {% cdv_platform ios %} | *Default: false* <br/> Set to true to avoid 3D Touch capable iOS devices rendering a magnifying glass widget when the user applies force while longpressing the webview. Test your app thoroughly since this disables onclick handlers, but plays nice with ontouchend. If this setting is true, SuppressesLongPressGesture will effectively be true as well.
SuppressesIncrementalRendering<br/>{% cdv_vartype boolean %} {% cdv_platform ios %} | *Default: false* <br/> Set to true to wait until all content has been received before it renders to the screen.
SuppressesLongPressGesture<br/>{% cdv_vartype boolean %} {% cdv_platform ios %} | *Default: false* <br/> Set to true to avoid iOS9+ rendering a magnifying glass widget when the user longpresses the webview. Test your app thoroughly since this may interfere with text selection capabilities.
Expand Down
43 changes: 15 additions & 28 deletions www/docs/en/dev/core/features/splashscreen/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ Controlls the length of the the splash screen fade effect.

**Data Type:** `Float`, in milliseconds

**Default Value:** `500`
**Default Value:** `500` (Android), `250` (iOS)

**Usage Example:**

Expand All @@ -368,47 +368,44 @@ window.setTimeout(function () {
}, splashDuration - fadeDuration);
```

### `ShowSplashScreenSpinner`
### `SplashScreenDelay`

Controlls the splash screen spinner.
Amount of time in milliseconds to wait before automatically hide splash screen.

**Supported Platforms:**

- Android
- iOS

**Data Type:** `Boolean`
**Data Type:** `Number`, in milliseconds

**Default Value:** `true`
**Default Value:** `0`

By default, the splash screen will automatically hide when the web content has finished loading. If you set a delay here, the splash screen will remain visible for that duration after the page load.

**Usage Example:**

```xml
<preference name="ShowSplashScreenSpinner" value="false"/>
<preference name="SplashScreenDelay" value="3000" />
```

### `SplashScreenDelay`
### `SplashScreenBackgroundColor`

Amount of time in milliseconds to wait before automatically hide splash screen.
The splash screen background color.

**Supported Platforms:**

- Android
- iOS

**Data Type:** `Number`, in milliseconds

**Default Value:** `true`

- Android
`-1`: The splash screen will automatically hide when the `onPageFinished` has been triggered.
**Data Type:** `String`, color hex code value.

- iOS
`3000`: The splash screen will automatically hide in 3 seconds.
**Default Value:** `#ffffff`

**Usage Example:**

```xml
<preference name="SplashScreenDelay" value="3000" />
<preference name="SplashScreenBackgroundColor" value="#ffffff" />
```

### `AndroidPostSplashScreenTheme`
Expand Down Expand Up @@ -473,7 +470,7 @@ Defines the duration of the icon's animation if an Animated Vector Drawable is s

### `AndroidWindowSplashScreenBackground`

The splash screen background color.
Deprecated, use `SplashScreenBackgroundColor` instead.

**Supported Platforms:**

Expand Down Expand Up @@ -546,16 +543,6 @@ Dismiss the splash screen.
navigator.splashscreen.hide();
```

**iOS Quirk:**

The `config.xml` file's `AutoHideSplashScreen` setting must be `false`. To delay hiding the splash screen for two seconds, add a timer such as the following in the `deviceready` event handler:

```js
setTimeout(function() {
navigator.splashscreen.hide();
}, 2000);
```

### `navigator.splashscreen.show`

Displays the splash screen.
Expand Down
Loading