HarmonyOS NEXT接口setWindowBackgroundColor设置窗口背景透明出错
发布时间
阅读量:
阅读量
【关键字】
窗口背景设置功能中,与透明度相关的参数调整可能导致系统出现崩溃现象。
【问题描述】
在调用@ohos.window模块中的setWindowBackgroundColor接口以设定窗口背景为透明状态时,可能会引发窗口无法正常显示并导致系统崩溃的问题。
相关问题代码示例如下:
let dialogConfig: window.Configuration = {
name: 'webKeyboard',
ctx: getContext(this),
windowType: window.WindowType.TYPE_DIALOG
}
window.createWindow(dialogConfig, (err, win) => {
win.resize(this.deviceInfo.width, this.deviceInfo.height);
win.moveWindowTo(0, 0)
win.setUIContent(path);
win.showWindow((err) => {
if (err.code) {
// conso
全部评论 (0)
还没有任何评论哟~
