The Shadow element has the following attributes. Some attributes are
required while others are optional.
Required attributes
The color attribute is required. You must specify the color using either the
ARGB format (#ff000000 = opaque black) or the RGB format (#000000 = black).
Fromversion4,thisattributeis[transformable][7].
Optional attributes
The Shadow element can contain the following attributes:
offsetX
A floating-point number that specifies the distance that the shadow is shifted
to the right of the text's center. Negative values indicate a shift to the left.
By default, this attribute's value is 2.0.
offsetY
A floating-point number that specifies the distance that the shadow is shifted
down from the text's center. Negative values indicate a shift upward.
By default, this attribute's value is 2.0.
radius
A floating-point number that specifies the distance that the shadow extends
beyond the edge of the text element.
By default, this attribute's value is 2.0.
Inner elements
The Shadow element can contain the following inner elements:
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-20 UTC."],[],[],null,["# Shadow\n\nWatch Face Format version Version 4 Version 3 Version 2 Version 1\n\n*** ** * ** ***\n\nDraws a shadow near a text element.\n\nIntroduced in Wear OS 4.\n\nSyntax\n------\n\n```xml\n\u003cShadow color=\"argb-color | rgb-color\" offsetX=\"float\"\n offsetY=\"float\" radius=\"float\"\u003e\n\u003c/Shadow\u003e\n```\n\nAttributes\n----------\n\nThe `Shadow` element has the following attributes. Some attributes are\nrequired while others are optional.\n\n### Required attributes\n\nThe `color` attribute is required. You must specify the color using either the\nARGB format (`#ff000000` = opaque black) or the RGB format (`#000000` = black). \n\n From version 4, this attribute is [transformable][7].\n\n### Optional attributes\n\nThe `Shadow` element can contain the following attributes:\n\n`offsetX`\n\n: A floating-point number that specifies the distance that the shadow is shifted\n to the right of the text's center. Negative values indicate a shift to the left.\n\n By default, this attribute's value is `2.0`.\n\n`offsetY`\n\n: A floating-point number that specifies the distance that the shadow is shifted\n down from the text's center. Negative values indicate a shift upward.\n\n By default, this attribute's value is `2.0`.\n\n`radius`\n\n: A floating-point number that specifies the distance that the shadow extends\n beyond the edge of the text element.\n\n By default, this attribute's value is `2.0`.\n\nInner elements\n--------------\n\nThe `Shadow` element can contain the following inner elements:\n\n- [`Underline`](/training/wearables/wff/group/part/text/decoration/underline)\n- [`StrikeThrough`](/training/wearables/wff/group/part/text/decoration/strike-through)\n- [`InlineImage`](/training/wearables/wff/group/part/text/formatter/inline-image)\n- [`Template`](/training/wearables/wff/group/part/text/formatter/template)\n- [`Upper`](/training/wearables/wff/group/part/text/formatter/upper)\n- [`Lower`](/training/wearables/wff/group/part/text/formatter/lower)\n\nRecommended for you\n-------------------\n\n- Note: link text is displayed when JavaScript is off\n- [Shadow](/training/wearables/wff/v2/group/part/text/decoration/shadow)\n- [Outline](/training/wearables/wff/group/part/text/decoration/outline)\n- [OutGlow](/training/wearables/wff/group/part/text/decoration/out-glow)"]]