全屏问题
·
FA模型,在app.ets的Oncreate内添加:
var windowClass = null;
let promise = window.getTopWindow();
promise.then((data)=> {
windowClass = data;
console.info('Succeeded in obtaining the top window. Data: ' + JSON.stringify(data))
}).then(()=>{
windowClass.setFullScreen(true)
this.windowFull=true
console.info('Succeeded in obtaining the top window. Data: ')
})
import文件:
import window from '@ohos.window';
如下图:
更多推荐
所有评论(0)