tuanjie引擎打包鸿蒙设置屏幕常量
导出鸿蒙包后用DevEco Studio打开,找到WindowUtils.ets,找到setScreenOn方法。
·
导出鸿蒙包后用DevEco Studio打开,找到WindowUtils.ets,找到setScreenOn方法
setScreenOn(value: boolean) {
let windowClass: window.Window = this.getMainWindow();
// only kNeverSleep & kSystemSetting are supported like other platforms
windowClass.setWindowKeepScreenOn(true); -- 此处改为写死的true,或者可以找到上层调用修改传入值
}
更多推荐
所有评论(0)