Search docs/

Statusbar

v2.4.2

Contents

インストール

Ionic Enterprise Editionのプラグインを利用する場合は、 通常のバージョンでスコープ指定されたプラグインに問題がある可能性があるため、 Ionic Enterprise Cordova CLIを使用していることを確認する必要があります。

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

Ionic Enterprise Cordova CLIをインストールしたら、プラグインをインストールできます。

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