Slider
<Slider name = "">
name
: the name used for the variable name- (Old scheme):
bounceInitSpeed
,bounceAcceleration
rebound animations initial velocity and acceleration (distance in pixels, the time in seconds), all support for regular expressions - (New programs to support easing functions):
easeType = ""
oreaseExp = ""
for the type of easing;easeTime = ""
to easing time - Specific parameters, please click http://www.miui.com/thread-2426258-1-1.html
alwaysShow = "true / false"
default is false, when a Slider visible, other Slider disappear.- You can have any number of
Slider
component. Trigger
Slider state switching, support theTrigger
- Rule: When the starting point
StartPoint
of x, y point with the finger movement fall into the target areaEndPoint
rectangle, then release the finger which can generate a trigger Slider starting point: the starting point of the elements contained in drag to move the location will follow the current operation.
<StartPoint x = "" y = "" w = "" h = "" easeType = "BounceEaseOut" easeTime = "1000" normalSound = "" pressedSound = ""> <! - Normal state, can contain several elements -> <NormalState> <Image /> <Time /> <DateTime /> <Text /> // The switch from other states to NormalState, trigger the Trigger <Trigger> <Command target = "test_trigger.visibility" value = "false" /> </ Trigger> </ NormalState> <! - At the click of regional press, indicating the start trigger operation, dragging, hiding other state elements, these elements are displayed -> <PressedState> <Image /> <Time /> <DateTime /> <Text /> // The switch from other states to PressedState, trigger the Trigger <Trigger> <Command target = "test_trigger.visibility" value = "true" /> </ Trigger> </ PressedState> <! - After reaching the trigger goal, hide other elements, these elements are displayed -> <ReachedState> <Image /> <Time /> <DateTime /> <Text /> // The switch from other states to ReachedState, trigger the Trigger -> <Trigger> <SoundCommand sound = "reached.mp3" volume = "1" /> </ Trigger> </ ReachedState> </ StartPoint>
- Three states can not specify, you can use variables to change the status to represent other interface elements triggering process. Slider target point: when the starting point of x, y points fall into the target area rectangle EndPoint reach the trigger position, then release your finger which can generate a trigger, you can have multiple triggers purposes.
<EndPoint x = "" y = "" w = "" h = "" reachedSound = "">
<! - Slider operation performed, you can specify a different intent ->
<Intent action = "" type = "" category = "" package = "" class = "" />
<NormalState>
</ NormalState>
<-! Show the target position if pressed trying to unlock ->
<PressedState>
<Image />
</ PressedState>
<-! Show specified image when reached target, if touch up then perform unlock ->
<ReachedState>
<Image />
</ ReachedState>
<- Slider path tolerance:! Start trigger operation path after moving the maximum distance exceeds this value is canceled, back to normal. Path can be specified x, y coordinates, the default is 0, Position coordinates relative coordinates. ->
<Path x = "" y = "" tolerance = "">
<Position x = "" y = "" />
<Position x = "" y = "" />
</ Path>
</ EndPoint>
<Slider name = "slider">
<StartPoint x = "31" y = "# screen_height-117" w = "90" h = "90">
<NormalState>
<Image x = "31" y = "# screen_height-117" src = "unlock_button.png">
</ Image>
</ NormalState>
</ StartPoint>
<EndPoint x = "359" y = "# screen_height-117" w = "90" h = "90">
<PressedState>
<Image x = "359" y = "# screen_height-117" src = "unlock_target.png">
</ Image>
</ PressedState>
<Path x = "0" y = "# screen_height-117">
<Position x = "31" y = "0" />
<Position x = "359" y = "0" />
</ Path>
</ EndPoint>
</ Slider>
- Slider's intent may be a
Trigger
andCommand
, aTrigger
can have multiple Command. See Command Trigger and Trigger & Command Unlocker
inheritance Slider, more than just the tag name usageSlider
toUnlocker
.- unlocking member rebound animation, see http://www.miui.com/thread-290094-1-1.html
- Lock screen sounds
StartPoint
:normalSound
,pressedSound
, specified in the normal state and press play audioEndPoint
:reachedSound
, reach the endpoint after playing sound<Unlocker name = "unlocker"> <StartPoint x = "0" y = "440" w = "480" h = "400" normalSound = "sound_normal.mp3" pressedSound = "sound_normal.mp3"> <EndPoint x = "0" y = "640" w = "480" h = "400" reachedSound = "sound_reached.mp3"> </ Unlocker>