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
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-05-20 UTC.
[null,null,["Last updated 2025-05-20 UTC."],[],[],null,["# Transform\n\nWatch Face Format version Version 4 Version 3 Version 2 Version 1\n\n*** ** * ** ***\n\nContains information about a geometric transformation.\n\nIntroduced in Wear OS 4.\n\nSyntax\n------\n\n```xml\n\u003cTransform target=\"string\" value=\"arithmetic-expression\"\n mode=\"TO | BY\"\u003e\n \u003cAnimation ... \u003e\n\u003c/Transform\u003e\n```\n\nAttributes\n----------\n\nThe `Transform` element has the following attributes. Some attributes are\nrequired while others are optional.\n\n### Required attributes\n\nThe following attributes are required:\n\n`target`\n: The name of the element to transform. This must be a\n [transformable](#transformable) attribute.\n\n`value`\n: An [arithmetic expression](/training/wearables/wff/common/attributes/arithmetic-expression) that evaluates to a distance or new position.\n\n### Optional attributes\n\nThe `mode` attribute is optional. It specifies whether you want to transform\nan element `BY` a specific number of units or `TO` a specific position. The\ndefault value is `TO`.\n\nInner elements\n--------------\n\nOptionally, the `Transform` element can contain an [`Animation`](/training/wearables/wff/common/transform/animation) inner\nelement, to specify more detailed instructions about how the transformation\nshould appear on, move around, or disappear from the watch face.\n\nTransformable attributes\n------------------------\n\nDifferent elements have different sets of attributes that support\ntransformations. Refer to the documentation for each element for further\ndetails.\n\nRecommended for you\n-------------------\n\n- Note: link text is displayed when JavaScript is off\n- [Features and APIs Overview](/about/versions/11/features)\n- [Variant](/training/wearables/wff/common/variant/variant)\n- [Layouts and binding expressions](/topic/libraries/data-binding/expressions)"]]