[经验分享]ZeppOS不同设备分辨率状况

fwz233 2022-01-04 22:57:00
加精

 一个方形的UI,在gts3上

75:为了避开方形屏幕上的title

22.5:为了剧中显示

   const back = hmUI.createWidget(hmUI.widget.IMG)
    back.setProperty(hmUI.prop.MORE, {
       x: 22.5,
        y: 75,
        w: 345,
        h: 345,
      src:'image/logo.png'
    })

  一个方形的UI,在gtr3上

 const back = hmUI.createWidget(hmUI.widget.IMG)
    back.setProperty(hmUI.prop.MORE, {
       x: 54.5,
        y: 54.5,
        w: 345,
        h: 345,
      src:'image/logo.png'
    })

 最终结果

一个圆型UI

//gts3
var arcProgress = hmUI.createWidget(hmUI.widget.ARC_PROGRESS)
    arcProgress.setProperty(hmUI.prop.MORE, {
      center_x: 195,
      center_y: 256,
      radius: 171,
      start_angle: 0,
      end_angle: 360,
      color: 0xc08eaf,
      line_width: 45,
      level: progress
    })
//gts3

//gtr3
var arcProgress = hmUI.createWidget(hmUI.widget.ARC_PROGRESS)
    arcProgress.setProperty(hmUI.prop.MORE, {
      center_x: 227,
      center_y: 227,
      radius: 200,
      start_angle: 0,
      end_angle: 360,
      color: 0xc08eaf,
      line_width: 50,
      level: progress
    })
//gtr3

具体效果:

 以供参考

 

...全文
316 回复 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

50

社区成员

发帖
与我相关
我的任务
社区描述
轻智能手表操作系统,支持Zeus小程序框架
小程序 企业社区
社区管理员
  • Zepp OS
  • 大师兄被抓走了
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

Zepp OS技术社区致力成为开发者爱好者的交流学习平台,我们希望在这里开发者们可以畅所欲言,以技术为工具,共筑健康美好新生活。

试试用AI创作助手写篇文章吧