主题文章

> 教程

[制作教程] MAML 之【自定义 Config】

发布时间: 2015-06-01 15:20

个性化设置<Config/>


<!--config.xml中-->
<Config>
<!--设置组 text 设置组名称-->
<Group text="日期时间">
<!--设置项目
//text:设置项名称,显示在设置界面中的文本
//summary:设置项详细说明
//id:设置项对应的变量名称
//default:缺省值
设置项目会把设置值绑定到百变锁屏的变量中,在manifest.xml中可以引用这些设置变量-->

<!--开关-->
<CheckBox text="" summary="" id="config_data" default="1"/>

<!--文字输入-->
<StringInput text="" summary="" id="config_format" default="k:mm"/>
<!--文字选择-->
<StringChoice text="" summary="" customizable="true" id="time_format">
<!--文字选择项目 value变量值 text界面显示文字-->
<Item value="hh:mm" text="12小时"/>
<Item value="kk:mm" text="24小时"/>
</StringChoice>

<!--数字输入-->
<NumberInput text="" summary="" id="" default=""/>
<!--数字选择-->
<NumberChoice text="" summary="" id="">
<!--数字选择项目 value数值 text界面显示文字-->
<Item value="0" text="模式1"/>
<Item value="1" text="模式2"/>
</NumberChoice>

<!--选择快捷方式 id: 对应 EndPoint 中Intent的id,表示设置相同id的intent 快捷方式-->
<AppPicker text="" id=""/>
</Group>
</Config>
<!-- manifest.xml中,调用config.xml里 #config_data-->
<Var name="config_data_var" expression="ifelse(isnull(#config_data),1,#config_data)" type="number" const="true"/>
<Unlocker>
<StartPoint x="0" y="" w="" h="">
</StartPoint>
<EndPoint x="0" y="" w="" h="">
<Intent id="left_task" action="android.intent.action.VIEW" type="vnd.android.cursor.dir/calls"/>
</EndPoint>
</Unlocker>

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

登录 立即注册