AnimatedImage

Element for drawing animated images (like GIF).

Syntax

<AnimatedImage resource="string" format="IMAGE | AGIF | WEBP"
                  thumbnail="string" />

Attributes

The AnimatedImage element has the following attributes:

Required attributes

The following attributes are required:

resource
A resource ID referring to the animated resource to render.

The following code snippet shows how to reference an animation located at res/drawable/my_anim.webp:

<AnimatedImage resource="my_anim" format="WEBP">
</AnimatedImage>
format
The format of the animation. Supported values are AGIF, WEBP, and IMAGE.

Optional attributes

The following attributes are optional:

thumbnail
A resource ID referring to a represenative thumbnail for the animation. This can be used to render in place of the AnimatedImage where animation is not supported (for example, in previews in the watch face carousel).