@capacitor/core#StatusBarStyle TypeScript Examples
The following examples show how to use
@capacitor/core#StatusBarStyle.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: app.component.ts From ionic-spotify with MIT License | 6 votes |
initializeApp() {
this.platform.ready().then(() => {
this.statusBar.styleDefault();
this.splashScreen.hide();
// Set statusbar text color
// iOS only
StatusBarPlugin.setStyle({
style: StatusBarStyle.Dark
});
// Android only
StatusBarPlugin.setBackgroundColor({
color: '#0f0f0f'
})
});
}
Example #2
Source File: app.component.ts From mylog14 with GNU General Public License v3.0 | 5 votes |
private setStatusBarStyle(): Observable<void> {
const setStyle$ = defer(() => StatusBar.setStyle({ style: StatusBarStyle.Light })).pipe(first());
return (this.platform.is('hybrid')) ? setStyle$ : of(null);
}