The command group is used to define a group of common commands for reuse, facilitating and simplifying command usage.
Display animations of different image elements. For example, cloud is moving with wind, birds are flying in the sky, or flowers are swaying amid grass.
Parameter | Type | Mandatory | Description |
|---|---|---|---|
method | String | Yes | Action. The default value is perform. Currently, no other options are available. |
paramTypes | Expression | No | Type of the parameter used to pass an action. The default value is String. Currently, no other options are available. |
params | String | Yes | Name of the trigger action passed in the command group. |
Use <VariableCommand> to control items in a command group and switch between different rotation animations.
<Text x="540" y="#screen_height-200+#ThemeAdEntry_slider.move_y" color="#000000" size="48" text="Change" 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>