是否可以全屏构建Windows桌面应用? “起初,当我运行我的应用时,尺寸为1200x900。
在我的config.xml中,我有这个<preference name="Fullscreen" value="true" />
我也基于cordova-plugin-statusbar
的研究获得了此代码:
this.platform.ready().then(() => {
StatusBar.hide();
});
但是我无法在Windows的全屏模式下运行该应用程序。我找到了一个解决方案,但仅适用于android:
if (this.platform.is("android")) {
this.androidFullScreen.isImmersiveModeSupported().then(
() => this.androidFullScreen.immersiveMode()
).catch((error: any) => console.log(error));
}
您可以尝试下面的代码,添加到[[page.ts文件中]
ionViewWillEnter() {
this.statusBar.overlaysWebView(true);
}// where you want full screen
ionViewWillEnter() {
this.statusBar.overlaysWebView(true);
}// where you want normal screen