Spinner Dialog
Cordova plugin for showing a native spinner based on Paldom/SpinnerDialog.
Requires Cordova plugin: cordova-plugin-native-spinner. For more info, please see the Spinner Dialog plugin docs.
Repo: https://github.com/greybax/cordova-plugin-native-spinner
Installation
- Install the Cordova and Ionic Native plugins:
$ ionic cordova plugin add cordova-plugin-native-spinner $ npm install --save @ionic-native/spinner-dialog@4 - Add this plugin to your app's module
Supported platforms
- Android
- iOS
- Windows Phone 8
- Windows
Usage
import { SpinnerDialog } from '@ionic-native/spinner-dialog';
constructor(private spinnerDialog: SpinnerDialog) { }
...
this.spinnerDialog.show();
this.spinnerDialog.hide();
Instance Members
show(title, message, cancelCallback, iOSOptions)
Shows the spinner dialog
| Param | Type | Details |
|---|---|---|
| title |
string
|
Spinner title (shows on Android only) |
| message |
string
|
Spinner message |
| cancelCallback |
boolean|function()
|
Set to true to set spinner not cancelable. Or provide a function to call when the user cancels the spinner. |
| iOSOptions |
object
|
Options for iOS only |
hide()
Hides the spinner dialog if visible
SpinnerDialogIOSOptions
| Param | Type | Details |
|---|---|---|
| overlayOpacity |
number
|
Opacity of the overlay, between 0 (transparent) and 1 (opaque). Default: 0.35 (optional) |
| textColorRed |
number
|
Red component of the text color, between 0 and 1. Default: 1 (optional) |
| textColorGreen |
number
|
Green component of the text color, between 0 and 1. Default: 1 (optional) |
| textColorBlue |
number
|
Blue component of the text color, between 0 and 1. Default: 1 (optional) |