鸿蒙ArkUI设置应用全屏
·
入口在 EntryAbility.ets #onWindowStageCreate()方法
windowStage.loadContent('pages/Index', (err) => {
if (err.code) {
hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');
return;
}
hilog.info(0x0000, 'testTag', 'Succeeded in loading the content.');
});
// 设置应用全屏
windowStage.getMainWindow().then((win) => {
win.setWindowLayoutFullScreen(true);
});
官方文档地址:文档中心
更多推荐


所有评论(0)