2015-11-29 08:26:55 +08:00
|
|
|
import {Plugin, Cordova} from './plugin';
|
2015-11-29 06:17:04 +08:00
|
|
|
|
2016-01-26 06:20:36 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Manage the appearance of the native status bar.
|
|
|
|
*
|
|
|
|
* @usage
|
|
|
|
* ```js
|
|
|
|
* StatusBar.hide(); // Hide the bar
|
|
|
|
*
|
|
|
|
* StatusBar.setStyle(StatusBar.LIGHT_CONTENT) // Good for dark backgrounds
|
|
|
|
* ```
|
|
|
|
*/
|
2015-11-29 08:26:55 +08:00
|
|
|
@Plugin({
|
2015-11-29 06:17:04 +08:00
|
|
|
name: 'StatusBar',
|
|
|
|
plugin: 'cordova-plugin-statusbar',
|
2015-11-29 08:26:55 +08:00
|
|
|
pluginRef: 'StatusBar'
|
|
|
|
})
|
|
|
|
export class StatusBar {
|
2016-01-26 06:20:36 +08:00
|
|
|
/**
|
|
|
|
* Set whether the status bar overlays the main app view. The default
|
|
|
|
* is true.
|
|
|
|
*
|
|
|
|
* @param doesOverlay whether the status bar overlays the main app view.
|
|
|
|
*/
|
2015-11-29 08:26:55 +08:00
|
|
|
@Cordova()
|
2015-11-30 09:54:45 +08:00
|
|
|
static overlaysWebView(doOverlay:boolean){};
|
2016-01-26 06:20:36 +08:00
|
|
|
|
2015-11-29 08:26:55 +08:00
|
|
|
@Cordova()
|
2015-11-30 09:54:45 +08:00
|
|
|
static styleDefault(){};
|
2016-01-26 06:20:36 +08:00
|
|
|
|
2015-11-29 08:26:55 +08:00
|
|
|
@Cordova()
|
2015-11-30 09:54:45 +08:00
|
|
|
static styleLightContent(){};
|
2016-01-26 06:20:36 +08:00
|
|
|
|
2015-11-29 08:26:55 +08:00
|
|
|
@Cordova()
|
2015-11-30 09:54:45 +08:00
|
|
|
static styleBlackTranslucent(){};
|
2016-01-26 06:20:36 +08:00
|
|
|
|
2015-11-29 08:26:55 +08:00
|
|
|
@Cordova()
|
2015-11-30 09:54:45 +08:00
|
|
|
static styleBlackOpaque(){};
|
2016-01-26 06:20:36 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Set the status bar to a specific named color. Valid options:
|
|
|
|
* black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown.
|
|
|
|
*
|
|
|
|
* iOS note: you must call StatusBar.setOverlay(false) to enable color changing.
|
|
|
|
*
|
|
|
|
* @param name the name of the color (from above)
|
|
|
|
*/
|
2015-11-29 08:26:55 +08:00
|
|
|
@Cordova()
|
2015-11-30 09:54:45 +08:00
|
|
|
static backgroundColorByName(colorName:string){};
|
2016-01-26 06:20:36 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Set the status bar to a specific hex color (CSS shorthand supported!).
|
|
|
|
*
|
|
|
|
* iOS note: you must call StatusBar.setOverlay(false) to enable color changing.
|
|
|
|
*
|
|
|
|
* @param hex the hex value of the color.
|
|
|
|
*/
|
2015-11-29 08:26:55 +08:00
|
|
|
@Cordova()
|
2015-11-30 09:54:45 +08:00
|
|
|
static backgroundColorByHexString(hexString:string){};
|
2016-01-26 06:20:36 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Hide the StatusBar
|
|
|
|
*
|
|
|
|
* Options:
|
|
|
|
*
|
|
|
|
* StatusBar.DEFAULT
|
|
|
|
* StatusBar.LIGHT_CONTENT
|
|
|
|
* StatusBar.BLACK_TRANSLUCENT
|
|
|
|
* StatusBar.BLACK_OPAQUE
|
|
|
|
*
|
|
|
|
* @param style the style from above
|
|
|
|
*/
|
2015-11-29 08:26:55 +08:00
|
|
|
@Cordova()
|
2015-11-30 09:54:45 +08:00
|
|
|
static hide(){};
|
2016-01-26 06:20:36 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Show the StatusBar
|
|
|
|
*/
|
2015-11-29 08:26:55 +08:00
|
|
|
@Cordova()
|
2015-11-30 09:54:45 +08:00
|
|
|
static show(){};
|
2015-11-29 06:17:04 +08:00
|
|
|
}
|