Group
<Group name = "" x = "" y = "" w = "" h = "" frameRate = "0">
<Image />
<Time />
<DateTime />
<Text />
<PositionAnimation />
<SizeAnimation />
</ Group>
Group
is a group of meaning, equivalent controls are a container that can be used to contain live other elements, such as pictures, time and so on. By adding the group to coordinate and width and height, you can easily adjust the position and size of a plurality of disposable elements. While Group also add a variety of animation types and Image as comprehensive- The new version also adds a frame rate control, if a group of elements are stationary, you can add
framaRate = "0"
, the system will automatically adjust the refresh rate, reduce memory and cpu usage each group based on the current frame rate. So it is recommended that you pick plus corresponding frame rate when adding Group
Variable
<Var>
variable
<Var name = "" expression = "" type = "" const = "" threshold = "" persist = "" />
- name the variable name
- expression corresponding expression variable or constant Note: If you define a string constant need more single quotes:
expression = "'my string'"
type = number / string
variables or string variable defined default value: numberconst = true
variable is calculated only once at initialization, the future will not be recalculated, you can improve efficiency. If the variable value will be changed during operation of the lock screen, const set to false Default:false
- threshold threshold is triggered, when the change of variable value exceeds the set threshold, you can trigger some commands. E.g:
The code represents a value of # time3 every 1, it will execute all commands<Var name = "time3" expression = "# minute% 10" threshold = "1"> <Trigger> <Command target = "time3_anim.visibility" value = "true" /> <Command target = "time3_anim.animation" value = "play" /> <Command target = "time3_anim_new.visibility" value = "false" /> <Command target = "time_3_anim_new.visiblity" value = "true" delay = "400" /> <Command target = "time_3_anim_new.animation" value = "play" delay = "400" /> </ Trigger> </ Var>
<Trigger />
inside persist default false, variable persistence
: Designated as true, if not re given the value of the other variable, then the value would have been saved, after re-locking or unlocking regardless reapply themes are not restored
Variable Array
<VarArray>
variable array
<VarArray type = "string">
<Vars>
<Var name = "date_format1" index = "# time / 2000% 5" />
<Var name = "date_format2" index = "2" const = "true" />
...
</ Vars>
<Items>
<Item expression = "ifelse (isnull (date_format), 'MMMMd day EEEE',date_format)" />
<Item value = "EEEE" />
...
</ Items>
</ VarArray>
- Item array element definitions
- expression element corresponding expression
- If the element is a constant value, the value specified by a constant value
Examples
// Define a rotated every two seconds date display DateTime every element format.
// Array elements can be used according to the digital value of the variable display different strings
<-! If const is true, the variable will only evaluate once at the initial time, ->
<Var name = "show_date" expression = "ifelse (isnull (#show_date), 1, # show_date)" type = "number" const = "true" />
<Var name = "text_size_date" expression = "ifelse (isnull (#text_size_date), 18, # tex t_size_date)" type = "number" const = "true" />
<VarArray type = "string">
<Vars>
<Var name = "date_format1" index = "# time / 2000% 5" />
<Var name = "date_format2" index = "2" const = "true" />
</ Vars>
<Items>
<Item expression = "ifelse (isnull (date_format), 'MMMMd day EEEE',date_format)" />
<Item value = "EEEE" />
<Item value = "yyyy Year" />
<Item value = "MMMM" />
<Item value = "d day" />
</ Items>
</ VarArray>
// Display the English Month
<VarArray type = "string">
<Vars>
<Var name = "month_str" index = "# month" />
</ Vars>
<Items>
<Item value = "January" />
<Item value = "February" />
...
<Item value = "November" />
<Item value = "December" />
</ Items>
</ VarArray>
<Text text = "@ month_str" color = "# FFFFFFFF" size = "20" ... />
- Some supplementary // array, they do some interesting games are useful, see the following example
<Var name = "sss" type = "number []" size = "5" const = "true" />
<Array name = "qqqqqq" count = "5" indexName = "__ i">
<Text x = "100 + 80 * # __ i" y = "100" textExp = "# sss [#__ i]" size = "72" color = "# ff0000" />
<Image x = "100 + 50 * # __ i" y = "400" src = "bg.png" />
</ Array>
<Button x = "0" y = "0" w = "1080" h = "1920">
<Triggers>
<Trigger action = "up">
<VariableCommand name = "aaa" expression = "(# aaa + 1)% 5" />
<VariableCommand name = "sss" type = "number []" index = "# aaa" expression = "# aaa" />
</ Trigger>
</ Triggers>
</ Button>
- In the Var,
type = "Number []"
arraysss
type definition, and if the character is usingString [], size = "5"
indicates there are five values sss#sss [0], # sss [1], # sss [2], # sss [3], # sss [4]
- In the Array, indexName defined variable names
__i, count = "5"
represents a variable__i
have equal when five cases0,1,2,3,4
- The above button
index = "# aaa"
definedsss
the index value , such as#sss [4]
, brackets subscript 4 represents the fifth value in the array ()