主题文章

> 教程

[制作教程] 自由桌面 之【添加小工具】

发布时间: 2015-06-11 11:47

/tools 中的小工具 如何添加到screen图层呢?

/tools 中的小工具 如何制作呢?


com.miui.home.freestyle/description.xml 中代码如下:

<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<scene width="1080" name="test1505240011">
<screen type="drift" width="1080" home="1">
<sprite left="0" top="0" _name="tool_1" rotation="0.0" scale_x="0.0" scale_y="0.0" width="0" height="0" appearance="" function="mtz_gadget:tools\page_4x4" />
</screen>
<screen type="background" width="1080" home="0" />
<screen type="foreground" width="1080" home="0" />
<screen type="dock" width="1080" home="0" />
</scene>

<sprite /> 标签,指定了某个小工具的单独文件夹(本例为tools/page_4x4文件夹)。

注意别踩“坑”:


com.miui.home.freestyle/tools/XXX/description.xml 中代码如下:

<MIUI-Theme>
<title>page_4x4
<version>1.0
<uiVersion>1
<previewX>0
<previewY>0
</MIUI-Theme>

<title/> 是小工具在编辑添加时,显示的名称

com.miui.home.freestyle/tools/XXX/manifest.xml 中代码如下:

<?xml version='1.0' encoding='utf-8'?>
<gadget version="1" frameRate="30" width="1080" height="1250" screenWidth="1080" >
<!-- 代码同百变框架,也会略有不同 -->
</gadget>

<gadget>...</gadget>添加你的代码。

亲,你需要登录后才能对该作品进行评论喔!

登录 立即注册