An analog clock is a container for
AnalogHands inner elements, which display
a series of clock hands that rotate around a watch face.
Introduced in Wear OS 4.
<AnalogClock x="integer" y="integer" width="integer" height="integer" pivotX="float" pivotY="float" angle="float-degrees" alpha="integer" scaleX="float" scaleY="float" renderMode="[SOURCE | MASK | ALL]" tintColor="argb-color | rgb-color"> <!-- This is the maximum number of hands that you can define. --> <HourHand ... /> <HourHand ... /> <MinuteHand ... /> <MinuteHand ... /> <SecondHand ... /> <SecondHand ... /> </AnalogClock>
AnalogClock element has the following attributes:
- A collection of integers that specify the element's size and position.
- 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] $.
- A number of degrees, clockwise, that the element should be rotated about its pivot point.
- Set the level of transparency that this element should have. A value of
0indicates that the element should be completely transparent. A value of
255indicates that the element should be completely opaque.
- The horizontal scaling factor to apply to this element.
- The vertical scaling factor to apply to this element.
- The element's render mode type. The default value for this element is
- 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 (
AnalogClock element can contain the following inner elements:
- Elements that represent the hour, minute, and second hands, respectively, that
rotate around the watch face.
AnalogClockcan contain at most 2 hour hands, 2 minute hands, and 2 second hands.
- Provides a hint for the locale to use when rendering the time. More
information is available in the
AnalogClock element can contain at most one
- Allows for changing attributes of this element when the Wear OS device is in
ambient mode. More information is available in the