状态栏颜色不起作用。
statusBar.backgroundColorByHexString("#13204c");
我使用离子3。
constructor(platform: Platform, statusBar: StatusBar, splashScreen:
SplashScreen) {
platform.ready().then(() => {
statusBar.styleDefault();
statusBar.backgroundColorByHexString("#13204c");
splashScreen.hide();
}
import { Component } from '@angular/core';
import { Platform } from 'ionic-angular';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { TabsPage } from '../pages/tabs/tabs';
@Component({
templateUrl: 'app.html'
})
export class MyApp {
rootPage:any = TabsPage;
constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen, private sqlite: SQLite) {
platform.ready().then(() => {
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
//statusBar.styleDefault();
statusBar.backgroundColorByHexString("#13204c");
splashScreen.hide();
});
}
}
答案 0 :(得分:1)
我更新了每个离子3.3.0库,现在它已经工作了。