Reputation: 4142
I'm unable to get the entire header color change. I manage to change the color of the white header but not the black header where time is shown. I understand that's out of Ionic and is part of the Android but I've seen many Apps which changes the color.
Upvotes: 1
Views: 883
Reputation: 24224
Use Ionic Native status bar:
npm install @ionic-native/core --save
ionic cordova plugin add cordova-plugin-statusbar
npm install --save @ionic-native/status-bar
Add Plugins to Your App's Module
` ...
import { StatusBar} from '@ionic-native/status-bar';
...
@NgModule({
...
providers: [
...
StatusBar
...
]
...
})
export class AppModule { }
`
And then use it in your rootPage:
`
import { StatusBar } from '@ionic-native/status-bar';
constructor(private statusBar: StatusBar) { }
...
// let status bar overlay webview
this.statusBar.overlaysWebView(true);
// set status bar to white
this.statusBar.backgroundColorByHexString('#ffffff');
`
For more information : https://ionicframework.com/docs/native/status-bar/
Upvotes: 4