Watch Face Format version <button value="5" default="">Version 5</button> <button value="4">Version 4</button> <button value="3">Version 3</button> <button value="2">Version 2</button> <button value="1">Version 1</button>

*** ** * ** ***

Represents the part of a watch face that contains exactly one text layout
element.

Introduced in Wear OS 4.

## Syntax

```xml
<PartText x="integer" y="integer" width="integer" height="integer"
           pivotX="float" pivotY="float" angle="float-degrees" alpha="integer"
           name="string" scaleX="float" scaleY="float"
           renderMode="[SOURCE | MASK | ALL]" 
           blendMode="string"
           tintColor="argb-color | rgb-color">
    <!-- Text-specific child elements. -->
    <Text>
        <!-- There must be raw text as the leaf inner element within a
            "PartText" element tree. -->
        <Font family="font" size="20" color="#00FFFF">Hello world
        </Font>
        <Font>
            <!-- Example of a text decoration element. -->
            <Outline>
                <!-- Example of a template with 2 string values. -->
                <Template>%s %s
                    <Parameter expression="[MONTH_S]" />
                    <Parameter expression="[DAY]" />
                </Template>
            </Outline>
            <!-- Example of a text formatting element. -->
            <Upper>
                <Template ... />
            </Upper>
            <Template ... />
        </Font>
    </Text>
    <!-- A "PartText" element can contain this "TextCircular" element instead
         of a "Text" element. -->
    <TextCircular centerX="180" centerY="180" direction="COUNTER_CLOCKWISE"
                  endAngle="90" height="340" width="340" startAngle="270">
        <!-- There must be raw text as the leaf inner element within a "PartText"
        element tree. -->
        <Font family="font" size="20" color="#00FFFF">Hello world
        </Font>
        <Font>
            Example of a text decoration element.
            <Outline>
                Example of a template with 2 string values.
                <Template>%s %s
                    <Parameter expression="[MONTH_S]" />
                    <Parameter expression="[DAY]" />
                </Template>
            </Outline>
            Example of a text formatting element.
            <Upper>
                <Template ... />
            </Upper>
            <Template ... />
        </Font>
    </TextCircular />
    -->

    <!-- Child elements that are shared across all "Part" elements. -->
    <Localization .../>
    <Transform .../>
    <Variant .../>
    <Gyro .../>
    <Launch .../>
    <ScreenReader .../>
</PartText>
```

## Attributes

The `PartText` element has the following attributes:

### Required attributes

The following attributes are required:

`x`, `y`, `width`, `height`

:   A collection of integers that specify the element's size and position.

    These attributes are [transformable](https://developer.android.com/reference/wear-os/wff/common/transform/transform).

### Optional attributes

The following attributes are optional:

`pivotX`, `pivotY`

:   A two-dimensional pivot point about which the element rotates. Both values
    are floating-point numbers that are scaled to fit in the range $ \[0, 1\] $.

    These attributes are [transformable](https://developer.android.com/reference/wear-os/wff/common/transform/transform).

`angle`

:   A number of degrees, clockwise, that the element should be rotated about its
    pivot point.

    This attribute is [transformable](https://developer.android.com/reference/wear-os/wff/common/transform/transform).

`alpha`

:   Set the level of transparency that this element should have. A value of `0`
    indicates that the element should be completely transparent. A value of `255`
    indicates that the element should be completely opaque.

    This attribute is [transformable](https://developer.android.com/reference/wear-os/wff/common/transform/transform).

`name`

:   A string that identifies this element. Useful if you need to refer to this
    element from another location within your watch face file.

`scaleX`

:   The horizontal scaling factor to apply to this element.

    This attribute is [transformable](https://developer.android.com/reference/wear-os/wff/common/transform/transform).

`scaleY`

:   The vertical scaling factor to apply to this element.

    This attribute is [transformable](https://developer.android.com/reference/wear-os/wff/common/transform/transform).

[`renderMode`](https://developer.android.com/training/wearables/wff/effects#clipping)

:   The element's render mode type. Possible values are: `SOURCE` (default),
    `MASK`, or `ALL`.

`tintColor`

:   Apply a tint color filter to the element. You must specify the color using
    either the ARGB format (`#ff000000` = opaque black) or the RGB format
    (`#000000` = black).

    From version 4, this attribute is [transformable](https://developer.android.com/reference/wear-os/wff/common/transform/transform).

[`blendMode`](https://developer.android.com/training/wearables/wff/effects#blend-mode)

:   *From Wear 5.1* : Sets the [`blendMode`](https://developer.android.com/reference/wear-os/wff/common/attributes/blend-mode) for drawing this `PartText` (this
    element is treated as the *src*).

## Inner elements

The `PartText` element can contain the following inner elements. All elements
are optional, except that either `Text` or `TextCircular` must be one of the
inner elements. A `PartText` element can contain an unlimited number of each
inner element -- except for `Text`, `TextCircular`, `Localization`, `Gyro`,
`Launch`, and `ScreenReader`, which can appear at most 1 time each.

- [`Text`](https://developer.android.com/reference/wear-os/wff/group/part/text/text)
- [`TextCircular`](https://developer.android.com/reference/wear-os/wff/group/part/text/text-circular)
- [`Localization`](https://developer.android.com/reference/wear-os/wff/common/localization)
- [`Transform`](https://developer.android.com/reference/wear-os/wff/common/transform/transform)
- [`Variant`](https://developer.android.com/reference/wear-os/wff/common/variant/variant)
- [`Gyro`](https://developer.android.com/reference/wear-os/wff/common/transform/gyro)
- [`Launch`](https://developer.android.com/reference/wear-os/wff/common/launch)
- [`ScreenReader`](https://developer.android.com/reference/wear-os/wff/common/screen-reader)
- [`Reference`](https://developer.android.com/training/wearables/wff/common/reference/reference)

## Recommended for you

- Note: link text is displayed when JavaScript is off
- [PartText](https://developer.android.com/reference/wear-os/wff/group/part/text/part-text)
- [Group](https://developer.android.com/reference/wear-os/wff/group/group)
- [PartImage](https://developer.android.com/reference/wear-os/wff/group/part/image/part-image)