Allows watch face creators to define modified appearances, by changing the values of specific color and geometric properties, when the Wear OS device is in different display modes. As of Wear OS 4, the only supported mode is ambient mode.
Introduced in Wear OS 4.
Syntax
<Variant mode="AMBIENT" target="attribute-name" value="valid-value" />
Attributes
The Variant
element has the following required attributes:
mode
The mode that the Wear OS device must be in for the variant to take effect.
As of Wear OS 4, this value must be
AMBIENT
.target
The attribute whose value should change when the specified Wear OS device mode takes effect. This must be a transformable attribute.
value
The value that the attribute should have when the specified Wear OS device mode takes effect.
Recommended for you
- Note: link text is displayed when JavaScript is off
- Features and APIs Overview
- Transform
- Layouts and binding expressions