参 数 | 类 型 | 选 项 | 注 释 |
|---|---|---|---|
method | 字符串 | 必填 | 执行动作,缺省值"perform",目前暂无其他选项 |
paramTypes | 表达式 | 选填 | 传入执行动作参数的类型,缺省值"String",目前暂无其他选项 |
params | 字符串 | 必填 | 传入命令组中具体Trigger action名称 |
示例一:通过变量命令控制命令组内选项,来切换不同旋转动画。
<Text x="540" y="#screen_height-200+#ThemeAdEntry_slider.move_y" color="#000000" size="48" text="点击变换" align="center"/> <Image x="610" y="390" centerX="136" centerY="151" src="aixin7.png" visibility="eq(#a,0)"> <RotationAnimation > <Rotation angle="0" time="0"/> <Rotation angle="15" time="300"/> <Rotation angle="0" time="600"/> </RotationAnimation> </Image> <Image x="310" y="390" centerX="78" centerY="151" src="ty.png" visibility="eq(#a,1)"> <RotationAnimation > <Rotation angle="0" time="0"/> <Rotation angle="15" time="300"/> <Rotation angle="30" time="900"/> <Rotation angle="45" time="1200"/> <Rotation angle="60" time="1500"/> <Rotation angle="75" time="1800"/> <Rotation angle="90" time="2100"/> </RotationAnimation> </Image> <Group name="triggersContainer"> <Trigger action="down"> <VariableCommand name="a" expression="#a+1" condition="le(#a,2)"/> <VariableCommand name="a" expression="0" condition="eq(#a,2)"/> </Trigger> <Trigger action="up"> <VariableCommand name="a" expression="0" condition="eq(#a,2)"/> <VariableCommand name="a" expression="#a+1" condition="le(#a,2)"/> </Trigger> </Group> <Button name="zk1" x="300" y="#screen_height-300" w="470" h="300"> <Trigger action="down"> <GroupCommands method="perform" paramTypes="String" params="down" /> </Trigger> </Button>