|
@@ -64,6 +64,51 @@ export class WindowHelper {
|
|
WindowHelper.cacheWindow = null
|
|
WindowHelper.cacheWindow = null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ private static _windowClass: window.Window | undefined = undefined;
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 设置窗口管理器
|
|
|
|
+ * @param value 在AppAbility中设置
|
|
|
|
+ */
|
|
|
|
+ public static set windowClass(value: window.Window | undefined) {
|
|
|
|
+ WindowHelper._windowClass = value;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public static get windowClass(): window.Window | undefined {
|
|
|
|
+ return WindowHelper._windowClass;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 设置是否全屏
|
|
|
|
+ * @param isLayoutFullScreen
|
|
|
|
+ */
|
|
|
|
+ static setWindowLayoutFullScreen(isLayoutFullScreen: boolean) {
|
|
|
|
+ if (WindowHelper._windowClass) {
|
|
|
|
+ WindowHelper._windowClass.setWindowLayoutFullScreen(isLayoutFullScreen);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 隐藏状态栏
|
|
|
|
+ */
|
|
|
|
+ static hideStatusBar() {
|
|
|
|
+ if (WindowHelper._windowClass) {
|
|
|
|
+ WindowHelper._windowClass.setSpecificSystemBarEnabled('status', false);
|
|
|
|
+ WindowHelper._windowClass.setSpecificSystemBarEnabled('navigationIndicator', false);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 显示状态栏
|
|
|
|
+ */
|
|
|
|
+ static showStatusBar() {
|
|
|
|
+ if (WindowHelper._windowClass) {
|
|
|
|
+ WindowHelper._windowClass.setSpecificSystemBarEnabled('status', true);
|
|
|
|
+ WindowHelper._windowClass.setSpecificSystemBarEnabled('navigationIndicator', true);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|