问题
so currently I make an initial call to hide the status bar at the beginning of the app and also set the actionbar to hidden in the constructor of all my components, yet when I open the keyboard in android the status bar shows back up and doens't hide when the keyboard hides. How should I deal with this, especially given the fact that nativescript has no events for on keyboard open and close? I just need to maintain the status bar hidden after the keyboard closes (preferable always).
To be more specific I'm using Nativescript 3.0, Typescript, and Angular 2 in my project.
回答1:
You have the option to bootstrap the Angular application with no action bar bu providing startPageAcrionBarHidden option
platformNativeScriptDynamic({startPageActionBarHidden: true});
For specific page you can use actionBarHidden property on page
e.g.
import { Page } from "ui/page";
constructor(private page: Page) {
this.page.actionBarHidden = true;
}
来源:https://stackoverflow.com/questions/44961846/how-should-i-keep-the-status-bar-and-actionbar-hidden-through-navigation-in-nati