Contains information about a geometric transformation.
Introduced in Wear OS 4.
Syntax
<Transform target="string" value="arithmetic-expression" mode="TO | BY"> <Animation ... > </Transform>
Attributes
The Transform
element has the following attributes. Some attributes are
required while others are optional.
Required attributes
The following attributes are required:
target
- The name of the element to transform. This must be a transformable attribute.
value
- An arithmetic expression that evaluates to a distance or new position.
Optional attributes
The mode
attribute is optional. It specifies whether you want to transform
an element BY
a specific number of units or TO
a specific position. The
default value is TO
.
Inner elements
Optionally, the Transform
element can contain an Animation
inner
element, to specify more detailed instructions about how the transformation
should appear on, move around, or disappear from the watch face.
Transformable attributes
Different elements have different sets of attributes that support transformations. Refer to the documentation for each element for further details.
Recommended for you
- Note: link text is displayed when JavaScript is off
- Features and APIs Overview
- Variant
- Layouts and binding expressions