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>

*** ** * ** ***

Applies an animation to the parent [`Transform`](https://developer.android.com/training/wearables/wff/common/transform/transform) element within the watch
face XML file. In cases where a `Transform` element changes the value of a
specific attribute, a child `Animation` element updates the changed value
gradually on the watch face.

Introduced in Wear OS 4.

## Syntax

```xml
<Transform ...>
    <!-- Only the "duration" attribute is required. -->
    <Animation interpolation="LINEAR | EASE_IN | EASE_OUT | EASE_IN_OUT |
               OVERSHOOT | CUBIC_BEZIER" controls="four-component-vector"
               angleDirection="NONE | CLOCKWISE | COUNTER_CLOCKWISE"
               repeat="integer" fps="integer"
               duration="float">
    </Animation>
</Transform>
```

## Attributes

The `Animation` element has the following attributes:

### Required attributes

The following attributes are required:

`duration`
:   The duration of the animation, in seconds. This attribute is required.

### Optional attributes

The following attributes are optional:

`interpolation`

:   The interpolation method to use for this animation. Possible values include
    the following:

    - `LINEAR` (default)
    - `EASE_IN`
    - `EASE_OUT`
    - `EASE_IN_OUT`
    - `OVERSHOOT`
    - `CUBIC_BEZIER`

`controls`

:   A 4-component vector that represents the position of the control points for
    the animation. The default value is \<0.5, 0.5, 0.5, 0.5\>.

    This attribute takes effect only when `interpolation` is set to `CUBIC_BEZIER`.

`angleDirection`

:   The direction to use when applying angular rotation to this animation.
    Possible values include the following:

    - `NONE` (default): No angular rotation
    - `CLOCKWISE`: Animate in the clockwise direction
    - `COUNTER_CLOCKWISE`: Animate in the counterclockwise direction

`repeat`

:   Indicates the number of times that the animation should repeat. A value of `0`
    (the default value) causes the animation to never repeat. A value of `-1` means
    the animation will loop indefinitely.

`fps`

:   The animation rate, in frames per second. The default value is `15`.

## Recommended for you

- Note: link text is displayed when JavaScript is off
- [AGSL Quick Reference](https://developer.android.com/develop/ui/views/graphics/agsl/agsl-quick-reference)
- [Background playback with a `MediaSessionService` {:#overview}](https://developer.android.com/media/media3/session/background-playback)
- [Arc](https://developer.android.com/training/wearables/wff/group/part/draw/shape/arc)