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:
centerXandcenterYA pair of floating-point values that specify the position of the element's center.
These attributes are transformable.
widthandheightA pair of floating-point values that specify the element's size.
startAngleandendAngleA 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
startAngleof335.0and anendAngleof45.0.These attributes are transformable.
Optional attributes
The following attributes are optional:
directionIndicates the direction in which the text is written:
CLOCKWISE(default): Show text in the clockwise direction.COUNTER_CLOCKWISE: Show text in the counterclockwise direction.
alignDetermines 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-alignedEND: right- or bottom-aligned (left-aligned when the current language uses an RTL text direction)
The default value is
CENTER.ellipsisA 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:
Recommended for you
- Note: link text is displayed when JavaScript is off
- TextCircular
- Arc
- Text