HarmonyOS 自定义扫码界面,如果传高度后,整个扫码框就不见了?

如题:HarmonyOS 自定义扫码界面,如果传高度后,整个扫码框就不见了?

阅读 516
1 个回答

可根据以下几种值测试下效果再根据支持比例进行微调当前支持宽高比例有:16:9、4:3、1:1。

XComponent组件
  .width(480).height(480)
ViewControl
width: 720, height: 720

XComponent组件
  .width(480).height(480)
ViewControl
width: 1080, height: 1920

XComponent组件
  .width(1080).height(1920)
ViewControl
width: 720, height: 720
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进