当前位置:首页 > MAML教程
? ? ? ? ? ? ? ? ?
? ? ? ?
VariableBinders: 定义各种变量绑定到的源,目前仅支持content provider。 ContentProviderBinder: 定义一个content provider源和绑定到它上面的变量
uri: content provider uri, 指定选用哪个content provider
uriFormat: 如果uri需要添加变量,可以用格式化,需要和uriParas一起使用 uriParas: 同Text element 的格式 columns: 需要查询的列名,用逗号分隔 where: 查询条件,同 SQL args: \的参数. order: 排序条件, 同 SQL
countName: 将查询结构数量绑定到该变量名
Variable: 定一个绑定变量
name: 变量名
type: content provider中的数据类型: string/double/float/int/long column: 变量绑定到的列的名称. row: 变量绑定到的行数,默认为0.
uriFormat=\er/weather/current/%d\ uriParas=\ columns=\re,description\ countName=\ - 20 - visibility=%ull(#weather_highTemperature))\color=\℃ / %d℃\paras=\ visibility=\weather_highTemperature))\color=\℃ / %d℃\paras=\ visibility=\#weather_highTemperature)\color=\℃ / --℃\paras=\ - 21 - 天气id列表: ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? weather_chance_of_rain = 2130837536; weather_chance_snow = 2130837540; weather_chance_storm = 2130837544; weather_clear = 2130837556; weather_cloudy = 2130837560; weather_flurries = 2130837564; weather_fog = 2130837568; weather_heavy_rain = 2130837572; weather_icy_sleet = 2130837576; weather_mist = 2130837583; weather_partly_cloudy = 2130837587; weather_rain = 2130837600; weather_snow_rain = 2130837606; weather_snow = 2130837608; weather_sunny = 2130837612; weather_thunderstorm = 2130837617; weather_unknown = 2130837621; weather_windy = 2130837626; 查询MIUI便签内容,显示第一条便签内容和修改时间 columns=\countName=\ uri =\columns = \where = \ - 22 - Trigger & Command ? Command 基础命令,可以通过对象名和对象的属性来控制界面里的其他元素。通常控制的是元素的可见性(visibility)和动画播放(animation)。 1. iamge1是被控制对象的名字,“.”后面跟的是属性(目前支持visibility和animation)。 2. 控制可见性的时候,value里面写true或者false,控制动画的时候,value写play(目 前不支持让动画暂停) 3. condition是条件判断,支持表达式。当condition里的条件判断为真时,执行命令;为 假时,不执行。 4. delay是延迟,以毫秒记。读取该命令后延迟一段时间再执行 5. delayCondition是延时判断,在delay的时间之后再进行判断。 例子: // second<40时,延时2000ms执行 expression=\condition=\delay=\/> // 延时6000ms后,如果second<40,执行 expression=\delay=\ // second<40时,延时4000ms,此时如果second<40,执行 VariableCommand - 23 -
共分享92篇相关文档