• 游客,欢迎来到米坛社区。
    米坛社区是大型中文智能穿戴设备交流社区,在这里交流你的极客思想,共同建造我们的智能世界
    为了更加方便的获取支持与帮助,请加入米坛社区官方QQ频道

米环7教程 更改背景組件

凌晨睡觉

LV0
普通成员
UID
242868
2023-04-01
28
0
玩玩
用這個api就可以更換背景
代码:
const editBg = hmUI.createWidget(hmUI.widget.WATCHFACE_EDIT_BG, {
          edit_id: 103,
          x: 0,
          y: 0,
          bg_config: [
            { id: 1, preview: 'images/bg_1.png', path: 'images/bg_1.png' },
            { id: 2, preview: 'images/bg_2.png', path: 'images/bg_2.png' },
            { id: 3, preview: 'images/bg_3.png', path: 'images/bg_3.png' },
            { id: 4, preview: 'images/bg_4.png', path: 'images/bg_4.png' },
            { id: 5, preview: 'images/bg_5.png', path: 'images/bg_5.png' }
          ],
          count: 5,
          default_id: 1,
          fg: 'images/fg.png',
          tips_x: 20,
          tips_y: 350,
          tips_bg: 'images/tips.png',
          show_level:hmUI.show_level.ONLY_NORMAL | hmUI.show_level.ONLY_EDIT,
        })

在測試我是從
⬇️⬇️⬇️這邊⬇️⬇️⬇️找的
 

江上渔者

LV0
普通成员
UID
232250
2023-03-18
40
0
感谢楼主的红包!

江上渔者领取了您的红包获得了0.00生米粒
 

劉子翊

LV0
普通成员
UID
244102
2023-04-02
221
14
感谢楼主的红包!

劉子翊领取了您的红包获得了0.00生米粒
 

531613181

LV0
普通成员
UID
249581
2023-04-08
75
9
感谢楼主的红包!

531613181领取了您的红包获得了0.00生米粒
 

金金金1

LV0
普通成员
UID
215985
2023-02-26
44
2
用這個api就可以更換背景
代码:
const editBg = hmUI.createWidget(hmUI.widget.WATCHFACE_EDIT_BG, {
          edit_id: 103,
          x: 0,
          y: 0,
          bg_config: [
            { id: 1, preview: 'images/bg_1.png', path: 'images/bg_1.png' },
            { id: 2, preview: 'images/bg_2.png', path: 'images/bg_2.png' },
            { id: 3, preview: 'images/bg_3.png', path: 'images/bg_3.png' },
            { id: 4, preview: 'images/bg_4.png', path: 'images/bg_4.png' },
            { id: 5, preview: 'images/bg_5.png', path: 'images/bg_5.png' }
          ],
          count: 5,
          default_id: 1,
          fg: 'images/fg.png',
          tips_x: 20,
          tips_y: 350,
          tips_bg: 'images/tips.png',
          show_level:hmUI.show_level.ONLY_NORMAL | hmUI.show_level.ONLY_EDIT,
        })

在測試我是從
⬇️⬇️⬇️這邊⬇️⬇️⬇️找的
6
 

大鱼哈哈

LV0
普通成员
UID
541042
2023-12-11
47
0
用這個api就可以更換背景
代码:
const editBg = hmUI.createWidget(hmUI.widget.WATCHFACE_EDIT_BG, {
          edit_id: 103,
          x: 0,
          y: 0,
          bg_config: [
            { id: 1, preview: 'images/bg_1.png', path: 'images/bg_1.png' },
            { id: 2, preview: 'images/bg_2.png', path: 'images/bg_2.png' },
            { id: 3, preview: 'images/bg_3.png', path: 'images/bg_3.png' },
            { id: 4, preview: 'images/bg_4.png', path: 'images/bg_4.png' },
            { id: 5, preview: 'images/bg_5.png', path: 'images/bg_5.png' }
          ],
          count: 5,
          default_id: 1,
          fg: 'images/fg.png',
          tips_x: 20,
          tips_y: 350,
          tips_bg: 'images/tips.png',
          show_level:hmUI.show_level.ONLY_NORMAL | hmUI.show_level.ONLY_EDIT,
        })

在測試我是從
⬇️⬇️⬇️這邊⬇️⬇️⬇️找的
 

*这是一则由 Google AdSense 自动推荐的广告,与本站无关,不对其真实性与可靠性负责