How should I keep the status bar and actionbar hidden through navigation in Nativescript?

感情迁移 提交于 2020-01-07 04:42:05

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!