Statusbar

v2.4.2

Contents

Installation

In order to use Ionic Enterprise Edition plugins you should make sure you're using the Ionic Enterprise Cordova CLI as the regular version can have issues with scoped plugins.

npm uninstall -g cordovanpm install -g @ionic-enterprise/cordova

Once you've installed the Ionic Enterprise Cordova CLI you can install the plugin.

ionic enterprise register --key=YOURPRODUCTKEYionic cordova plugin add @ionic-enterprise/statusbar

Index

Classes


Classes

StatusBar

StatusBar:

name: Status Bar

description: Manage the appearance of the native status bar.

usage:

import { StatusBar } from '@ionic-enterprise/statusbar/ngx';

constructor(private statusBar: StatusBar) { }

...

// let status bar overlay webview
this.statusBar.overlaysWebView(true);

// set status bar to white
this.statusBar.backgroundColorByHexString('#ffffff');

isVisible

● isVisible: boolean

Whether the StatusBar is currently visible or not.


backgroundColorByHexString

backgroundColorByHexString(hexString: string): void

Set the status bar to a specific hex color (CSS shorthand supported!).

iOS note: you must call StatusBar.overlaysWebView(false) to enable color changing.

Parameters:

Name Type Description
hexString string The hex value of the color.

Returns: void


backgroundColorByName

backgroundColorByName(colorName: string): void

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.overlaysWebView(false) to enable color changing.

Parameters:

Name Type Description
colorName string The name of the color (from above)

Returns: void


hide

hide(): void

Hide the StatusBar

Returns: void


overlaysWebView

overlaysWebView(doesOverlay: boolean): void

Set whether the status bar overlays the main app view. The default is true.

Parameters:

Name Type Description
doesOverlay boolean Whether the status bar overlays the main app view.

Returns: void


show

show(): void

Show the StatusBar

Returns: void


styleBlackOpaque

styleBlackOpaque(): void

Use the blackOpaque statusbar (light text, for dark backgrounds).

Returns: void


styleBlackTranslucent

styleBlackTranslucent(): void

Use the blackTranslucent statusbar (light text, for dark backgrounds).

Returns: void


styleDefault

styleDefault(): void

Use the default statusbar (dark text, for light backgrounds).

Returns: void


styleLightContent

styleLightContent(): void

Use the lightContent statusbar (light text, for dark backgrounds).

Returns: void



Other Versions