StatusBar
API Reference: UI.StatusBar
This class represents the status bar object. Creating an instance of StatusBar is not valid since you can't use in anywhere. If you want to access the status bar object, you can access it via the UI.Page.statusBar property of a page.
caution
If the StatusBar visible, page starts under the StatusBar for Android but StatusBar will overlaps the page for iOS if the HeaderBar is invisible at this moment.
import PageSampleDesign from "generated/pages/page3";
import { Route, Router } from "@smartface/router";
import Application from "@smartface/native/application";
//You should create new Page from UI-Editor and extend with it.
export default class Sample extends PageSampleDesign {
constructor(private router?: Router, private route?: Route) {
super({});
}
onShow() {
super.onShow();
const { headerBar } = this;
Application.statusBar.visible = true;
//@ts-ignore
Application.statusBar.dispatch({
type: "updateUserStyle",
userStyle: {
android: {
color: "#6FCAF7",
},
style: "LIGHTCONTENT",
},
});
headerBar.visible = false;
}
onLoad() {
super.onLoad();
}
}