The SecondHand element has the following attributes:
Required attributes
The following attributes are required:
resource
A resource ID corresponding to the name of a drawable in the res directory.
x, y, width, height
A collection of integers that specify the element's size and position.
Optional attributes
The following attributes are optional:
pivotX, pivotY
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] $.
alpha
Set the level of transparency that this element should have. A value of 0
indicates that the element should be completely transparent. A value of 255
indicates that the element should be completely opaque.
tintColor
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
(#000000 = black).
Inner elements
The SecondHand element can contain either of the following elements:
Sweep
Causes the element to move around the watch face in a continuous motion. More
information is available in the Sweep reference.
Tick
Causes the element to move around the watch face in short, discrete bursts. More
information is available in the Tick reference.
Additionally the SecondHand element can contain the following inner elements:
Variant
Allows for changing attributes of this element when the Wear OS device is in
ambient mode. More information is available in the Variant reference.
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,["# SecondHand\n\nWatch Face Format version Version 4 Version 3 Version 2 Version 1\n\n*** ** * ** ***\n\nA second hand is a clock hand that rotates around a watch face once every\nminute.\n\nIntroduced in Wear OS 4.\n\nSyntax\n------\n\n```xml\n\u003cSecondHand resource =\"string\" x=\"integer\" y=\"integer\" width=\"integer\"\n height=\"integer\" pivotX=\"float\" pivotY=\"float\" alpha=\"integer\"\n tintColor=\"argb-color | rgb-color\" /\u003e\n```\n\nAttributes\n----------\n\nThe `SecondHand` element has the following attributes:\n\n### Required attributes\n\nThe following attributes are required:\n\n`resource`\n: A resource ID corresponding to the name of a drawable in the res directory.\n\n`x`, `y`, `width`, `height`\n: A collection of integers that specify the element's size and position.\n\n### Optional attributes\n\nThe following attributes are optional:\n\n`pivotX`, `pivotY`\n: A two-dimensional pivot point about which the element rotates. Both values\n are floating-point numbers that are scaled to fit in the range $ \\[0, 1\\] $.\n\n`alpha`\n: Set the level of transparency that this element should have. A value of `0`\n indicates that the element should be completely transparent. A value of `255`\n indicates that the element should be completely opaque.\n\n`tintColor`\n: Apply a tint color filter to the element. You must specify the color using\n either the ARGB format (`#ff000000` = opaque black) or the RGB format\n (`#000000` = black).\n\nInner elements\n--------------\n\nThe `SecondHand` element can contain either of the following elements:\n\n`Sweep`\n: Causes the element to move around the watch face in a continuous motion. More\n information is available in the [`Sweep`](/training/wearables/wff/clock/sweep) reference.\n\n`Tick`\n: Causes the element to move around the watch face in short, discrete bursts. More\n information is available in the [`Tick`](/training/wearables/wff/clock/tick) reference.\n\nAdditionally the `SecondHand` element can contain the following inner elements:\n\n`Variant`\n: Allows for changing attributes of this element when the Wear OS device is in\n ambient mode. More information is available in the [`Variant`](/training/wearables/wff/common/variant/variant) reference.\n\nRecommended for you\n-------------------\n\n- Note: link text is displayed when JavaScript is off\n- [AnalogClock](/training/wearables/wff/clock/analog-clock)\n- [HourHand](/training/wearables/wff/clock/hour-hand)\n- [MinuteHand](/training/wearables/wff/clock/minute-hand)"]]