TextCircular

Specifies a circular or curved text configuration.

Introduced in Wear OS 4.

Syntax

<TextCircular centerX="float" centerY="float"
              direction="CLOCKWISE | COUNTER_CLOCKWISE" width="float"
              height="float" startAngle="float-degrees"
              endAngle="float-degrees" align="START | CENTER | END"
              ellipsis="boolean" >
    <!-- Possible inner elements. The PartText element syntax shows a
         more complete example. -->
    <Transform .../>
    <Font ... />
    <BitmapFont ... />
</TextCircular>

Attributes

The TextCircular element has the following attributes. Some attributes are required while others are optional.

Required attributes

The following attributes are required:

centerX and centerY

A pair of floating-point values that specify the position of the element's center.

These attributes are transformable.

width and height

A pair of floating-point values that specify the element's size.

startAngle and endAngle

A pair of floating-point values that specify the angle of the text's starting side and the angle of the text's ending side, respectively. An angle of 0 degrees represents the 12 o'clock position on the watch face.

For example, to curve text around the top quarter of the watch face, use a startAngle of 335.0 and an endAngle of 45.0.

These attributes are transformable.

Optional attributes

The following attributes are optional:

direction

Indicates the direction in which the text is written:

  • CLOCKWISE (default): Show text in the clockwise direction.
  • COUNTER_CLOCKWISE: Show text in the counterclockwise direction.
align

Determines the text's alignment within its parent element:

  • START: left- or top-aligned (right-aligned when the current language uses an RTL text direction)
  • CENTER: center-aligned
  • END: right- or bottom-aligned (left-aligned when the current language uses an RTL text direction)

The default value is CENTER.

ellipsis

A boolean value that indicates whether to show an ellipsis if the text is too long to fit in the parent element. The default is FALSE.

Inner elements

The Text element can contain any number of the following inner elements: