How to hide virtual buttons and title bar using Io

2019-07-27 10:13发布

问题:

I'm developing an Ionic 2 Android application. I want to know how can I hide the control button on the bottom ("← O 口") as well as the title bar on the top?

回答1:

According to this question, we can hide the status bar in Ionic 2 using the following code:

import {StatusBar} from 'ionic-native';
import {App, Platform} from 'ionic-angular';
//He wrotes 'ionic/ionic', but it doesn't work for me.
constructor(private platform: Platform) {
    this.platform.ready().then(()=>{
        StatusBar.hide();
    }
}