Shadow

Draws a shadow near a text element.

Introduced in Wear OS 4.

Syntax

<Shadow color="argb-color | rgb-color" offsetX="float"
        offsetY="float" radius="float">
</Shadow>

Attributes

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).

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: