Text

Displays text format, coordinate property supports variable

  • color: text color, # FFFFFF
  • size: Text Size
  • bold: bold, true representation bold
  • format: If you need to display variable numbers in the text, you need to specify the format, specify the location with the% d digit
  • paras: If you specify the format, you need to specify variable expression% d corresponding in paras where there can be multiple variable expression by "," apart
  • align: Alignment left, center, right, text coordinates
  • textExp: literal expression, you can directly call the desired output variables such as "time is now 9:00," can be written textExp = "'now time' + # hour12 + 'point'." width text width, when the text exceeds the specified width will be cut off. If more than one row of the display will fold lines. If you specify the text scrolling, scrolling in the specified location will display text
  • marqueeSpeed ​​text scrolling speed, with the width of the use of the above
  • marqueeGap scroll interval. When the interval after the re-emergence of the text display, the default width of four characters
  • rotation (X, Y, Z) rotation angle, the old angle can also be used, but the recommended rotation, because of relatively high atmospheric internationalization
  • multiLine true / false whether to support multi-line display, default false
  • spacingMult multiple default line spacing 1
  • spacingAdd spacing increment default 0
  • Shadow
    • shadowDx horizontal offset distance relative to the text
    • shadowDy vertical direction relative to the text of the offset distance
    • shadowRadius shadow blur radius, can blur the shadow effect
    • shadowColor shadow colors, support transparency
    • Example: xml <Text shadowDx = "3" shadowDy = "4" shadowRadius = "6" shadowColor = "# 9c000000" ... />
  • text.text_width width of a line of text can be used to typeset
    <Text name = "tt" ... />
    # Tt.text_width
    
  • Example:

    Display the next alarm time
    <Text text = "@ next_alarm_time" ... />
    <Text format = "Next Alarm: [% s] Battery: [% d %%]" paras = "@ next_alarm_time, # battery_level" />
    
    textExp property supports string expression:
    * Weather information, if the temperature display is empty - is not empty display values
    <Text visibility = "# hasweather" x = "(# screen_width / 2) +180" y = "# screen_height-290" w = "360" size = "36" color = "# ffffff" align = "right" textExp = "ifelse (isnull (#weather_temperature), '-', # weather_temperature) + '℃'" />
    

results matching ""

    No results matching ""