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>

*** ** * ** ***

A time text is a formatted string representing the current time.

Introduced in Wear OS 4.

## Syntax

```xml
<TimeText format="string" hourFormat="12 | 24 | SYNC_TO_DEVICE"
             align="START | CENTER | END" x="integer" y="integer"
             width="integer" height="integer" pivotX="float" pivotY="float"
             angle="float-degrees" alpha="integer"
             tintColor="argb-color | rgb-color" />
```

## Attributes

The `TimeText` element has the following attributes:

### Required attributes

The following attributes are required:

`format`

:   A format string representing the time format.

    This list includes several different formats for showing the time 12:34:56 PM:

    - `hh:mm:ss` renders as "12:34:56".
    - `h:mm` renders as "12:34"
    - `hh_10` renders as "1".
    - `hh_1` renders as "2".
    - `m` renders as "34"
    - `mm_10` renders as "3".
    - `mm_1` renders as "4".
    - `ss` renders as "56"
    - `ss_10` renders as "5".
    - `ss_1` renders as "6".

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

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

### Optional attributes

The following attributes are optional:

`hourFormat`
:   Whether to use 12- or 24-hour notation to display the time. Defaults to
    `SYNC_TO_DEVICE`, which applies the user's preference that's configured on the
    device.

`align`:
:   How to align the text within the bounding box. Defaults to "START".

`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\] $.

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

`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.

`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).

`verticalAlign`

:   How to align the text vertically within the bounding box:

    - `TOP`: the text top edge is aligned on the top of the bounding box.
    - `BOTTOM`: the text bottom edge is aligned on the bottom of the bounding box.
    - `CENTER`: the text center is aligned on the center of the bounding box.
    - `CENTER_ON_BASELINE`: the text baseline is aligned on the center of the bounding box.

## Inner elements

The `TimeText` element can contain the following inner elements:

`Variant`
:   Allows for changing attributes of this element when the Wear OS device is in
    ambient mode. More information is available in the [`Variant`](https://developer.android.com/training/wearables/wff/common/variant/variant) reference.

`BitmapFont`
:   A [BitmapFont](https://developer.android.com/training/wearables/wff/group/part/text/bitmap-font) to use for rendering the time.

`Font`
:   A [Font](https://developer.android.com/training/wearables/wff/group/part/text/font) to use for rendering the time.

## Recommended for you

- Note: link text is displayed when JavaScript is off
- [DigitalClock](https://developer.android.com/training/wearables/wff/clock/digital-clock)
- [AnalogClock](https://developer.android.com/training/wearables/wff/clock/analog-clock)
- [Group](https://developer.android.com/training/wearables/wff/group/group)