Search code examples
cordovaionic-frameworkstatusbar

Ionic 4 : Problem with Statusbar overflow content


I have a little problem with my app, the StatusBar doesn't show properly as you can see :

enter image description here

I declared the StatusBar with Statusbar plugin : https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-statusbar/

In app.component.ts

this.statusBar.overlaysWebView(true);
this.statusBar.show();

Can I set a custom padding-top for all my pages and the menu ? Or is it a properly method to show the statusbar ?


Solution

  • app.component.ts

    initializeApp() {
        this.platform.ready().then(() => {
          this.statusBar.overlaysWebView(true);
          this.splashScreen.hide();
        });
      }
    

    pages.ts

    ionViewWillEnter() {
        this.statusBar.overlaysWebView(false); 
        this.statusBar.show();
      }