Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

I am not able to change Status Bar color

$
0
0

@codingBeast wrote:

Hi, I am know to Ionic and I am trying to add a color to the status bar. I already downloaded cordova’s plugin and the status bar package from npm. I checked config.xml and the plugin is there. I already changed the overlayWebView to true and to false to see what happened and tried to change the color of the status bar. But nothing has worked. Here’s my code:

import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams, Platform } from 'ionic-angular';
import { StatusBar } from '@ionic-native/status-bar';


@IonicPage()
@Component({
  selector: 'page-welcome',
  templateUrl: 'welcome.html',
})
export class WelcomePage {


  constructor(public navCtrl: NavController, public navParams: NavParams, public statBar: StatusBar, public platform: Platform) {
    this.platform= platform;
    this.platform.ready().then( () => {
      this.statBar.overlaysWebView(true);
      this.statBar.backgroundColorByHexString('#ffffff');
    });
  }

  ionViewDidLoad() {
    console.log('ionViewDidLoad WelcomePage');

  }





}

I would be very grateful if anyone could tell me why this is not working. Thanks in advance.

Posts: 4

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>