文档管理中心

桌面万象小组件(随主题包一起上架)

功能概述

支持桌面万象小组件随手机主题包一起上架。应用时可根据自己的想法将桌面万象小组件自由组合,打造个性化桌面。

桌面万象小组件示例:时钟、天气、音乐、日历、步数、倒计时等小组件。

使用说明

  • 支持设备:桌面万象小组件支持应用于直板手机、平板和折叠屏。
  • 版本要求:主题APP需升级到12.0.12.300及以上版本,才能使用主题包内的桌面万象小组件功能。

主题包结构

桌面万象小组件随手机主题包一起上架时,结构如下图所示:

  • 新增theme-widget文件夹(桌面万象小组件目录)。
  • 新增preview_card_X.jpg(桌面万象小组件预览图),加入手机主题包已有的preview文件夹中。

theme-widget/preview

theme-widget文件夹下的preview文件夹为小组件选择弹窗目录,包含多张bg_X.png和一个manifest.xml文件。

应用场景:在桌面上添加小组件容器后,点击“填充”将出现小组件选择弹窗,用户在此弹窗中选择并添加某个具体的小组件。

bg_X.png

bg_X.png为小组件选择弹窗背景图。

样例参考:

规格要求:

  • 命名:固定命名为bg_X.png。
  • 张数:一张或多张,有多张时X=0,1,2…
  • 背景尺寸:984*1656px。
  • 格式:png。
说明
  1. bg_X.png尺寸固定为984*1656px,已上架的包含桌面万象小组件的主题资源由主题引擎完成等比缩放兼容适配。
  2. 小组件选择弹窗背景图上需描述清楚各个组件的功能和交互方式,描述需与实际应用后的效果相符。

manifest.xml文件

此manifest.xml文件是小组件选择弹窗的脚本文件,规定了弹窗的大小和每个小组件的添加方式。

xml规范

<?xml version="1.0" encoding="UTF-8"?>
<Widget version="1" screenWidth="984" screenHeight="1656" frameRate="30" displayDesktop="true">

    <Image y="" x="" w="" src="" h=""/>
    <Button y="" x="" w="" h="">
       <Trigger action="">
           <ExternCommand condition="" command=""/>
       </Trigger>
    </Button>

</Widget>
说明
  1. 桌面万象小组件的主标签<Widget>在主题APP 12.0.16及以上版本中支持。
  2. bg_X.png尺寸固定为984*1656px,此对应的manifest.xml的大小也应为984*1656px,即screenHeight="1656" ,screenWidth="984" 。
  3. command的值是添加小组件的路径。每个command的值,需与实际小组件的名称和路径一一对应。例如:command="w2_h2/widget",添加的是w2_h2文件夹中的小组件widget;command="w4_h2/widget2",添加的是w4_h2文件中的小组件widget2。文件夹命名详见theme-widget/wx_hx文件夹说明。
  4. 添加每个小组件时,需使用action="click"(触发动作明显),不要使用action="down"(触发动作不明显),避免滑动屏幕时误操作。

xml示例

<?xml version="1.0" encoding="UTF-8"?>
<Widget version="1" screenWidth="984" screenHeight="1656" frameRate="30" displayDesktop="true">
    <Var persist="true" expression="#screen_width" const="true" name="w"/>
    <Var persist="true" expression="#screen_height" const="true" name="h"/>
    <Var expression="0" name="group"/>

    <!-- 第1组 -->
    <Group visibility="eq(#group,0)">
    <Image y="0" x="0" w="#screen_width" src="bg1.png" h="#screen_height"/>
    <!-- 模拟时钟 -->
    <Button y="150" x="359" w="471.5" h="490.1">
       <Trigger action="click">
           <ExternCommand condition="1" command="w2_h2/widget"/>
       </Trigger>
    </Button>
    <!-- 3D翻转 -->
    <Button y="870" x="119" w="336.7" h="372">
        <Trigger action="click">
            <ExternCommand condition="1" command="w2_h2/widget1"/>
        </Trigger>
    </Button>
    <!-- 时间UI -->
    <Button y="870" x="512" w="312.9" h="372">
        <Trigger action="click">
           <ExternCommand condition="1" command="w2_h2/widget2"/>
        </Trigger>
    </Button>
    </Group>

    <!-- 第2组 -->
    <Group visibility="eq(#group,1)">
    <Image y="0" x="0" w="#screen_width" src="bg2.png" h="#screen_height"/>
    <!-- 卡片 -->
    <Button y="363" x="469" w="362.7" h="301.3">
        <Trigger action="click">
           <ExternCommand condition="1" command="w2_h2/widget3"/>
        </Trigger>
    </Button>
    <!-- 红包 -->
    <Button y="317" x="141" w="315.3" h="375.7">
      <Trigger action="click">
         <ExternCommand condition="1" command="w2_h2/widget4"/>
      </Trigger>
    </Button>
    <!-- 天气2 -->
    <Button y="898" x="131" w="264.1" h="326.4">
       <Trigger action="click">
          <ExternCommand condition="1" command="w2_h2/widget5"/>
       </Trigger>
    </Button>
    <!-- 天气1 -->
    <Button y="900" x="414" w="415.7" h="324.6">
        <Trigger action="click">
            <ExternCommand condition="1" command="w4_h2/widget"/>
        </Trigger>
    </Button>
    </Group>

    <!-- 第3组 -->
    <Group visibility="eq(#group,2)"> 
    <Image y="0" x="0" w="#screen_width" src="bg3.png" h="#screen_height"/>
    <!-- 步数1 -->
    <Button y="419" x="123" w="706.8" h="336.7">
        <Trigger action="click">
            <ExternCommand condition="1" command="w4_h2/widget1"/>
        </Trigger>
    </Button>
    <!-- 步数2 -->
    <Button y="782" x="124" w="705.9" h="389.7">
        <Trigger action="click">
            <ExternCommand condition="1" command="w4_h2/widget2"/>
        </Trigger>
    </Button>
    </Group>

    <Button y="590" x="0" w="100" h="212">
        <Trigger action="click">
            <VariableCommand expression="ifelse(gt(#group,0), #group-1, #group)" name="group"/>
        </Trigger>
    </Button>

    <Button y="590" x="839" w="100" h="212">
        <Trigger action="click">
            <VariableCommand expression="ifelse(lt(#group,2), #group+1, #group)" name="group"/>
        </Trigger>
    </Button>

    <Button y="0" x="0" w="#w" h="#h">
        <Trigger action="up">
            <VariableCommand expression="ifelse(lt(#group,2), #group+1, #group)" name="group" condition="gt(#touch_begin_x-#touch_x,150)"/>
            <VariableCommand expression="ifelse(gt(#group,0), #group-1, #group)" name="group" condition="lt(#touch_begin_x-#touch_x,-150)"/>
        </Trigger>
    </Button>

</Widget>

theme-widget/wx_hx文件夹

在桌面上添加小组件容器后,点击“填充”将出现小组件选择弹窗,用户在此弹窗中选择并添加某个具体的小组件。

添加的小组件容器默认尺寸为2*2,可以根据当前填充的小组件内容,将其调整至合适尺寸。

制作桌面万象小组件主题包时,建议将在相同尺寸的小组件容器中填充效果较好的小组件,归类放在同一个文件夹中,这个归类文件夹建议命名为:wx_hx(wx为小组件容器的宽,hx为小组件容器的高,x为尺寸值,取值范围1-6)。归类文件夹可以根据需要,添加多个

例如:当前填充的小组件为步数小组件,在默认的2*2小组件容器中填充效果不太好。手动将小组件容器尺寸调整为4*2时,步数小组件的填充效果较好。则可以将步数小组件归类放在w4_h2文件夹中。

wx_hx文件夹更多示例:

  • 模拟时钟、日历、时间、红包、卡片、天气这6个小组件在2*2的小组件容器中展示效果较好,归类放在w2_h2文件夹中。
  • 投影天气、步数1和步数2这3个小组件在4*2的小组件容器中展示效果较好,归类放在w4_h2文件夹中。

wx_hx文件夹说明:

归类文件夹名称和小组件文件夹名称确定后,需要与manifest.xml文件中command的值一一对应,command的值是添加小组件的路径。

示例:command="w2_h2/widget",添加的是w2_h2文件夹中的widget,即模拟时钟组件;command="w4_h2/widget2",添加的是w4_h2文件中的widget2,即步数2组件。

    <!-- 模拟时钟 -->
    <Button y="150" x="359" w="471.5" h="490.1">
       <Trigger action="click">
           <ExternCommand condition="1" command="w2_h2/widget"/>
       </Trigger>
    </Button>

    <!-- 步数2 -->
    <Button y="782" x="124" w="705.9" h="389.7">
        <Trigger action="click">
            <ExternCommand condition="1" command="w4_h2/widget2"/>
        </Trigger>
    </Button>

theme-widget/wx_hx/widget

widget是小组件文件夹,包含当前小组件使用的资源图片和manifest.xml文件。

资源图片

  • 图片格式:png。
  • 命名:自由命名,可包含英文、数字。

manifest.xml文件

xml规范

<?xml version="1.0" encoding="UTF-8"?>
<Widget screenHeight="" screenWidth="" displayDesktop="true" frameRate="30" version="1">
</Widget>

xml注意事项

  1. manifest.xml中必须设置screenHeight、screenWidth来规定小组件的初始宽高。调整小组件容器大小时,小组件内容按照初始宽高比例等比例缩放。
  2. 除了随主题包一起上架外,桌面万象小组件还支持单独上架,单独上架时需制作8类功能小组件,且8类功能小组件需制作2*2和4*2两种尺寸。便于后续高效适配单独上架的场景,在随手机主题包一起上架的资源包中,功能小组件也建议以2*2和4*2两种尺寸进行制作,详情请查看8类功能小组件尺寸要求
  3. manifest.xml中使用步数、时钟、天气、日历时,必须设置对应的应用跳转链接,且触发跳转需使用action="click"(触发动作明显),不要使用action="down"(触发动作不明显),避免滑动屏幕时误操作。

    步数:action="android.intent.action.MAIN" package="com.huawei.health" class="com.huawei.health.MainActivity"

    时钟:action="android.intent.action.MAIN" package="com.android.deskclock" class="com.android.deskclock.AlarmsMainActivity"

    天气:action="android.intent.action.MAIN" package="com.huawei.android.totemweather" class="com.huawei.android.totemweather.WeatherHome"

    日历:action="android.intent.action.MAIN" package="com.android.calendar" class="com.android.calendar.AllInOneActivity"
        <!-- 示例:跳转至天气应用,跳转方式为click -->
        <Button y="0" x="0" w="940" h="940">
           <Trigger action="click">
              <IntentCommand action="android.intent.action.MAIN" package="com.huawei.android.totemweather" condition="1" class="com.huawei.android.totemweather.WeatherHome"/>
           </Trigger>
        </Button>
  4. 小组件中使用天气数据时,必须设置天气刷新命令(脚本示例如下),详见小组件示例:天气
       <ExternalCommands>
            <Trigger action="resume">
                <RefreshWeatherCommand/>
            </Trigger>
            <Trigger action="pause"/>
        </ExternalCommands>

小组件示例:模拟时钟

  • 切图资源

  • 关键脚本
<?xml version="1.0" encoding="UTF-8"?>
<Widget screenHeight="940" screenWidth="940" displayDesktop="true" frameRate="30" version="1">
    <Group visibility="true" y="0" x="0">
        <Image visibility="eq(#bg_id,0)" y="0" x="0" src="clock_1.png"/>
        <Image visibility="eq(#bg_id,1)" y="0" x="0" src="clock_2.png"/>
        <Image visibility="eq(#bg_id,2)" y="0" x="0" src="clock_3.png"/>
        <Image y="90" x="435" src="minute.png" rotation="360*(#minute/60)" pivotY="380" pivotX="35"/>
        <Image y="90" x="435" src="hour.png" rotation="360*(#hour12/12)+30*(#minute/60)" pivotY="380" pivotX="35"/>
        <Image y="90" x="435" src="second.png" rotation="360*(#second/60)" pivotY="380" pivotX="35"/>
     </Group>

     <Button y="0" x="0" h="940" w="940">
        <Trigger action="click">
           <IntentCommand action="android.intent.action.MAIN" class="com.android.deskclock.AlarmsMainActivity" package="com.android.deskclock"/>
        </Trigger>
     </Button>
</Widget>

小组件示例:天气

  • 切图资源

  • 关键脚本
<?xml version="1.0" encoding="UTF-8"?>
<Widget screenHeight="940" screenWidth="940" displayDesktop="true" frameRate="30" version="1">
    <Var persist="true" expression="#screen_width" const="true" name="w"/>
    <Var persist="true" expression="#screen_height" const="true" name="h"/>

    <ExternalCommands>
        <Trigger action="resume">
            <RefreshWeatherCommand/>
        </Trigger>
        <Trigger action="pause"/>
    </ExternalCommands>

    <Weather>
        <Var expression="0" name="Weather.today.weatherid" type="int"/>
        <!-- 今天天气 -->
        <Var expression="0" name="Weather.today.weatherDes" type="string"/>
        <!-- 今天天气 -->
        <Var expression="0" name="Weather.today.currentTem" type="int"/>
        <!-- 当前气温 -->
        <Var expression="0" name="Weather.today.maxtemp" type="string"/>
        <!-- 最高气温 -->
        <Var expression="0" name="Weather.today.mintemp" type="string"/>
        <!-- 最低气温 -->
        <Var expression="0" name="Weather.today.winddirDes" type="string"/>
        <!-- 风向 -->
        <!--Var name="Weather.today.dressingLevel" expression="0" type="string"/-->
        <!-- 穿衣 -->
        <Var expression="0" name="Weather.today.humidity" type="string"/>
        <!-- 湿度 -->
        <Var expression="0" name="Weather.today.aqivaluetext" type="string"/>
        <!-- 空气 -->
        <!--Var name="Weather.today.sportsLevel" expression="0" type="string"/-->
        <!-- 运动 -->
        <Var expression="0" name="Weather.today.coldLevel" type="string"/>
        <!-- 感冒 -->
        <Var expression="0" name="Weather.today.carWashLevel" type="string"/>
        <!-- 洗车 -->
        <Var expression="0" name="Weather.today.sunRise" type="string"/>
        <!-- 日出 -->
        <Var expression="0" name="Weather.today.sunSet" type="string"/>
        <!-- 日落 -->
    </Weather>

    <Image visibility="eq(#Weather.today.weatherid,4)+eq(#Weather.today.weatherid,6)+eq(#Weather.today.weatherid,7) +eq(#Weather.today.weatherid,13)+eq(#Weather.today.weatherid,16)+eq(#Weather.today.weatherid,20)+ eq(#Weather.today.weatherid,23)+eq(#Weather.today.weatherid,35)+eq(#Weather.today.weatherid,36)+ eq(#Weather.today.weatherid,38)+eq(#Weather.today.weatherid,39)+eq(#Weather.today.weatherid,40)+ eq(#Weather.today.weatherid,41)+eq(#Weather.today.weatherid,42)+eq(#Weather.today.weatherid,43)+eq(#Weather.today.weatherid,44)" src="bg_1.png" y="0" x="0"/>

    <Image visibility="eq(#Weather.today.weatherid,1)+eq(#Weather.today.weatherid,2)+ eq(#Weather.today.weatherid,3)+eq(#Weather.today.weatherid,5)+eq(#Weather.today.weatherid,14)+eq(#Weather.today.weatherid,17) +eq(#Weather.today.weatherid,21)+eq(#Weather.today.weatherid,30)+eq(#Weather.today.weatherid,33)+eq(#Weather.today.weatherid,34)+eq(#Weather.today.weatherid,37)" src="bg_2.png" y="0" x="0"/>

     <Image visibility="eq(#Weather.today.weatherid,19)+eq(#Weather.today.weatherid,22) +eq(#Weather.today.weatherid,24)+eq(#Weather.today.weatherid,25)" src="bg_3.png" y="0" x="0"/>

     <Image visibility="eq(#Weather.today.weatherid,8)+eq(#Weather.today.weatherid,31)+ eq(#Weather.today.weatherid,32)+eq(#Weather.today.weatherid,11)" src="bg_4.png" y="0" x="0"/>

     <Image visibility="eq(#Weather.today.weatherid,12)+eq(#Weather.today.weatherid,15)+ eq(#Weather.today.weatherid,18)+eq(#Weather.today.weatherid,26)+eq(#Weather.today.weatherid,29)" src="bg_5.png" y="0" x="0"/>

     <Group visibility="true" y="0" x="0"
         <!--晴天-->
         <Image visibility="eq(#Weather.today.weatherid,1)+eq(#Weather.today.weatherid,2)+ eq(#Weather.today.weatherid,3)+eq(#Weather.today.weatherid,5)+eq(#Weather.today.weatherid,14)+eq(#Weather.today.weatherid,17) +eq(#Weather.today.weatherid,21)+eq(#Weather.today.weatherid,30)+eq(#Weather.today.weatherid,33)+eq(#Weather.today.weatherid,34)+eq(#Weather.today.weatherid,37)" src="weather/weather_2.png" y="200" x="#w/2" align="center"/>
         <!--多云-->
         <Image visibility="eq(#Weather.today.weatherid,4)+eq(#Weather.today.weatherid,6)+eq(#Weather.today.weatherid,7) +eq(#Weather.today.weatherid,13)+eq(#Weather.today.weatherid,16)+eq(#Weather.today.weatherid,20)+ eq(#Weather.today.weatherid,23)+eq(#Weather.today.weatherid,35)+eq(#Weather.today.weatherid,36)+ eq(#Weather.today.weatherid,38)+eq(#Weather.today.weatherid,39)+eq(#Weather.today.weatherid,40)+ eq(#Weather.today.weatherid,41)+eq(#Weather.today.weatherid,42)+eq(#Weather.today.weatherid,43)+eq(#Weather.today.weatherid,44)" src="weather/weather_1.png" y="200" x="#w/2" align="center"/>
       <!--雨天-->
       <Image visibility="eq(#Weather.today.weatherid,12)+eq(#Weather.today.weatherid,15)+ eq(#Weather.today.weatherid,18)+eq(#Weather.today.weatherid,26)+eq(#Weather.today.weatherid,29)" src="weather/weather_5.png" y="200" x="#w/2" align="center"/>
       <!--阴天-->
       <Image visibility="eq(#Weather.today.weatherid,8)+eq(#Weather.today.weatherid,31)+ eq(#Weather.today.weatherid,32)+eq(#Weather.today.weatherid,11)" src="weather/weather_4.png" y="200" x="#w/2" align="center"/>
       <!--雪天-->
       <Image visibility="eq(#Weather.today.weatherid,19)+eq(#Weather.today.weatherid,22) +eq(#Weather.today.weatherid,24)+eq(#Weather.today.weatherid,25)" src="weather/weather_3.png" y="200" x="#w/2" align="center"/>
       <Text name="tem" y="424" x="388" size="100" paras="#Weather.today.currentTem" format="%d" color="#B53F45" alignV="top"/>
       <Image src="sign.png" y="477" x="388+#tem.text_width"/>
   </Group>

   <Button y="0" x="0" w="940" h="940">
       <Trigger action="up">
          <IntentCommand action="android.intent.action.MAIN" package="com.huawei.android.totemweather" condition="1" class="com.huawei.android.totemweather.WeatherHome"/>
       </Trigger>
    </Button>

</Widget>

小组件示例:步数

  • 切图资源

  • 关键脚本
<?xml version="1.0" encoding="UTF-8"?>
<Widget screenHeight="470" screenWidth="940" displayDesktop="true" frameRate="30" version="1">
     <Var globalPersist="true" expression="#steps_value" name="step"/>
     <Image visibility="lt(#step, 1000)" y="0" x="0" src="step_0.png"/>
     <Image visibility="ge(#step, 1000)*lt(#step, 5000)" y="0" x="0" src="step_1000.png"/>
     <Image visibility="ge(#step, 5000)" y="0" x="0" src="step_5000.png"/>

     <!--步数显示-->
     <Image visibility="ge(#step,0)*lt(#step,10)" y="100" x="150" src="step_num.png" srcid="digit(#step, 1)"/> 
     <Image visibility="ge(#step,0)*lt(#step,10)" y="100" x="210" src="step_bu.png"/>
     <Image visibility="ge(#step,10)*lt(#step,100)" y="100" x="150" src="step_num.png" srcid="digit(#step, 2)"/>
     <Image visibility="ge(#step,10)*lt(#step,100)" y="100" x="210" src="step_num.png" srcid="digit(#step, 1)"/>
     <Image visibility="ge(#step,10)*lt(#step,100)" y="100" x="270" src="step_bu.png"/>
     <Image visibility="ge(#step,100)*lt(#step,1000)" y="100" x="150" src="step_num.png" srcid="digit(#step, 3)"/>
     <Image visibility="ge(#step,100)*lt(#step,1000)" y="100" x="210" src="step_num.png" srcid="digit(#step, 2)"/>
     <Image visibility="ge(#step,100)*lt(#step,1000)" y="100" x="270" src="step_num.png" srcid="digit(#step, 1)"/>
     <Image visibility="ge(#step,100)*lt(#step,1000)" y="100" x="330" src="step_bu.png"/>
     <Image visibility="ge(#step,1000)*lt(#step,10000)" y="100" x="150" src="step_num.png" srcid="digit(#step, 4)"/>
     <Image visibility="ge(#step,1000)*lt(#step,10000)" y="100" x="210" src="step_num.png" srcid="digit(#step, 3)"/>
     <Image visibility="ge(#step,1000)*lt(#step,10000)" y="100" x="270" src="step_num.png" srcid="digit(#step, 2)"/>
     <Image visibility="ge(#step,1000)*lt(#step,10000)" y="100" x="330" src="step_num.png" srcid="digit(#step, 1)"/>
     <Image visibility="ge(#step,1000)*lt(#step,10000)" y="100" x="390" src="step_bu.png"/>
     <Image visibility="ge(#step,10000)" y="100" x="150" src="step_num.png" srcid="digit(#step, 5)"/>
     <Image visibility="ge(#step,10000)" y="100" x="210" src="step_num.png" srcid="digit(#step, 4)"/>
     <Image visibility="ge(#step,10000)" y="100" x="270" src="step_num.png" srcid="digit(#step, 3)"/>
     <Image visibility="ge(#step,10000)" y="100" x="330" src="step_num.png" srcid="digit(#step, 2)"/>
     <Image visibility="ge(#step,10000)" y="100" x="390" src="step_num.png" srcid="digit(#step, 1)"/>
     <Image visibility="ge(#step,10000)" y="100" x="450" src="step_bu.png"/>

     <!--进度条显示-->
     <Image y="200" x="150" src="bottomline.png"/>
     <Image visibility="gt(#step, 0)*le(#step, 1000)" y="200" x="150" src="redline_1.png"/>
     <Image visibility="gt(#step, 1000)*le(#step, 2000)" y="200" x="150" src="redline_2.png"/>
     <Image visibility="gt(#step, 2000)*le(#step, 3000)" y="200" x="150" src="redline_3.png"/>
     <Image visibility="gt(#step, 3000)*le(#step, 4000)" y="200" x="150" src="redline_4.png"/>
     <Image visibility="gt(#step, 4000)*le(#step, 5000)" y="200" x="150" src="redline_5.png"/>
     <Image visibility="gt(#step, 5000)*le(#step, 6000)" y="200" x="150" src="redline_6.png"/>
     <Image visibility="gt(#step, 6000)*le(#step, 7000)" y="200" x="150" src="redline_7.png"/>
     <Image visibility="gt(#step, 7000)*le(#step, 8000)" y="200" x="150" src="redline_8.png"/>
     <Image visibility="gt(#step, 8000)*lt(#step, 10000)" y="200" x="150" src="redline_9.png"/>
     <Image visibility="ge(#step, 10000)" y="200" x="150" src="redline_10.png"/>

     <!--步数跳转-->
     <Button y="0" x="0" h="470" w="940">
         <Trigger action="click">
             <IntentCommand action="android.intent.action.MAIN" class="com.huawei.health.MainActivity" package="com.huawei.health"/>
         </Trigger>
     </Button>

</Widget>

preview文件夹

preview文件下,包含桌面万象小组件详情页预览图(preview_card_X.jpg)和手机大/小主题包其他模块预览图。

preview_card_X.jpg

preview_card_X.jpg为桌面万象小组件详情页预览图,将展示在资源详情页。

规格要求:

  • 命名:固定命名为preview_card_X.jpg。
  • 张数:≥4张,X=0,1,2,3…
  • 尺寸:1080×2160px。
  • 格式:.jpg。
  • 是否必做:必做。

内容要求:

  • 只能包含桌面万象小组件内容,不能出现手机壁纸/图标/锁屏等无关内容。
  • preview_card_X.jpg中,大标题必须统一使用完整名称“桌面万象小组件”;详细内容介绍可以使用完整名称“桌面万象小组件”或简称“万象小组件”;具体的万象小组件可命名为“时钟小组件”、“步数小组件”等。完整名称"桌面万象小组件"和简称"万象小组件"都为固定写法,不可更改。
  • 每张preview_card_X.jpg,都有其特定的内容要求:
    展开

    张数

    内容要求

    preview_card_0.jpg(第1张)

    桌面万象小组件整体介绍,展示所有小组件的样式。

    preview_card_X. jpg(X=1,2... 即第2张至倒数第2张)

    桌面万象小组件详情介绍,展示单个或多个小组件,介绍每个小组件的名称、简介或玩法。

    preview_card_X. jpg(最后1张)

    桌面万象小组件使用说明,展示添加桌面万象小组件的步骤和方法:①在主题APP的资源详情页点击“应用”→②点击“添加”小组件→③在桌面上点击“复制”小组件→④点击“填充”选择小组件→⑤滑动/点击等方式切换小组件选择页面→⑥点击添加小组件。具体可参考下图preview_card_3.jpg示例。

    说明

    请严格按以上的步骤和方法进行桌面万象小组件使用说明。

description.xml

桌面万象小组件主题的简介描述中:大标题必须统一使用完整名称“桌面万象小组件”;详细内容介绍可以使用完整名称“桌面万象小组件”或简称“万象小组件”;具体的万象小组件可命名为“时钟小组件”、“步数小组件”等。完整名称"桌面万象小组件"和简称"万象小组件"都为固定写法,不可更改。

支持的引擎能力

展开

分类

引擎能力

桌面万象小组件

基础功能>视图

文本<Text>

图片<Image>

动态图片<APNG>

动态图片<Gif>

视频<Video>

x

时间<Time>

日期<DateTime>

倒计时<CountDownTime>

数字图片<ImageNumber>

串联图片<ImageSeries>

帧解锁视图<SourceImage>

x

遮罩<Mask>

图片混合<GroupImage>

几何图形<Geometrical figure>

路径解析<PathUtil>

基础功能>组

视图组<Group>

虚拟屏幕<VirtualScreen>

基础功能>控件

按钮<Button>

滑块<Slider>

x

解锁<Unlocker>

x

基础功能>变量

自定义变量<Var>

全局变量<GlobalVariable>

变量数组<VarArray>

控件数组<Array>

基础功能>表达式

数字表达式<Expression>

字符串表达式<StringExpression>

基础功能>命令

基础命令<Command>

声音命令<SoundCommand>

可见性命令<visibility>

Intent命令<IntentCommand>

变量命令<VariableCommand>

通用命令<ExternCommand>

命令组<GroupCommands>

x

周期命令<CycleCommand>

x

天气数据刷新命令<RefreshWeatherCommand>

线性马达振动命令<VibrateCommand>

流体增减命令<ParticleCommand>

x

刚体变速受力命令<CollBodyCommand>

基础功能>多语言

图片多语言<PicMultiLanguage>

基础功能>数学曲线

变速函数<VarSpeedFun>

基础功能>数据开放

蓝牙耳机数据开放<BluetoothBattery>

天气数据开放<Weather>

日历数据开放<Calendar>

音乐数据开放<MediaControl>

运动健康数据开放<Healthy>

系统数据开放

步数<StepCount>

基础功能>适配功能

传感器<SensorBinder>

摇一摇<shake>

充电状态<BatteryCharging>

x

震动设置<vibrate>

恒定帧率<frameRate>

可变帧率<VariableFramerate>

多屏幕展示<MultiScreens>

x

麦克风音量感知<Microphone>

基础功能>用户自定义文案

用户自定义文案

2D基础动效

透明度动画<AlphaAnimation>

位移动画<PositionAnimation>

旋转动画<RotationAnimation>

缩放动画<SizeAnimation>

帧动画<SourcesAnimation>

变量动画<VariableAnimation>

时间动画<TimeAnimation>

2D高级动效

2D物理碰撞<CollisionWorld>

流体动效<FluidsView>

x

新充电动效<EMUI11.0>

x

网格化-位移<MeshImage-Translation>

网格化-水波纹<MeshImage-SinMotion>

笔刷<Paint>

x

下落动效<DropPhysicalView>

x

全景动效<VR>

x

延时解锁<DelayUnlock>

x

水波纹<WaterWallpaper>

x

跟手粒子<ParticleView>

x

3D高级动效

3D旋转视图<StereoView>

立体图层<MultiLayer>

x

搜索
请输入您想要搜索的关键词