HarmonyOS 如何在旋转屏幕后修改CustomDialogController的maskRect?

addDialogController = new CustomDialogController({
  builder: BaseDialogView({
    value: value,
  }),
  alignment: DialogAlignment.Bottom,
  autoCancel: false,
  customStyle: true,
  maskColor: Color.Red,
  // maskRect: ({x:0,y:300 ,width:'100%',height:'100%'}),
  maskRect: ({
    x: 0,
    y: AppUtils.deviceHeight() - addDialogHeight - 5,
    width: '100%',
    height: '100%'
  }),
})
阅读 455
1 个回答
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进