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).
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.
[[["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,["# AnimatedImage\n\nWatch Face Format version Version 4 Version 3 Version 2 Version 1\n\n*** ** * ** ***\n\nElement for drawing animated images (like GIF).\n\nSyntax\n------\n\n```xml\n\u003cAnimatedImage resource=\"string\" format=\"IMAGE | AGIF | WEBP\"\n thumbnail=\"string\" /\u003e\n```\n\nAttributes\n----------\n\nThe `AnimatedImage` element has the following attributes:\n\n### Required attributes\n\nThe following attributes are required:\n\n`resource`\n: A resource ID referring to the animated resource to render.\n\nThe following code snippet shows how to reference an animation located at\n`res/drawable/my_anim.webp`: \n\n```xml\n\u003cAnimatedImage resource=\"my_anim\" format=\"WEBP\"\u003e\n\u003c/AnimatedImage\u003e\n```\n\n`format`\n: The format of the animation. Supported values are `AGIF`, `WEBP`, and `IMAGE`.\n\n### Optional attributes\n\nThe following attributes are optional:\n\n`thumbnail`\n: A resource ID referring to a represenative thumbnail for the animation. This\n can be used to render in place of the `AnimatedImage` where animation is not\n supported (for example, in previews in the watch face carousel).\n\nRecommended for you\n-------------------\n\n- Note: link text is displayed when JavaScript is off\n- [Thumbnail](/training/wearables/wff/group/part/animated-image/thumbnail)\n- [Layouts and binding expressions](/topic/libraries/data-binding/expressions)\n- [Limitations and troubleshooting](/develop/ui/compose/tooling/relay/limitations-and-troubleshooting)"]]