The Complication element must contain a type attribute. The element is
rendered if the user chooses a matching complication type. See Complication Types for details.
Inner elements
The Complication element can contain any number of 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,["# Complication\n\nWatch Face Format version Version 4 Version 3 Version 2 Version 1\n\n*** ** * ** ***\n\nA Complication element defines how a particular Complication Type is displayed\non the watch face.\n\nFor each [type](#attributes) of complication, you can use the following in expressions.\nThis lets you access the data provided to the complication:\n\n- `LONG_TEXT`:\n - `COMPLICATION.MONOCHROMATIC_IMAGE`\n - `COMPLICATION.SMALL_IMAGE`\n - `COMPLICATION.TEXT`\n - `COMPLICATION.TITLE`\n- `MONOCHROMATIC_IMAGE`:\n - `COMPLICATION.MONOCHROMATIC_IMAGE`\n - `COMPLICATION.MONOCHROMATIC_IMAGE_AMBIENT`\n- `PHOTO_IMAGE`:\n - `COMPLICATION.PHOTO_IMAGE`\n- `RANGED_VALUE`:\n - `COMPLICATION.MONOCHROMATIC_IMAGE`\n - `COMPLICATION.MONOCHROMATIC_IMAGE_AMBIENT`\n - `COMPLICATION.TEXT`\n - `COMPLICATION.TITLE`\n - `COMPLICATION.RANGED_VALUE_MIN`\n - `COMPLICATION.RANGED_VALUE_MAX`\n - `COMPLICATION.RANGED_VALUE_VALUE`\n - `COMPLICATION.RANGED_VALUE_COLORS` - (a space-separated list of hex colors, for example `#FF0000 #00FF00`)\n - `COMPLICATION.RANGED_VALUE_COLORS_INTERPOLATE` - (a boolean specifying whether to interpolate colors)\n- `SHORT_TEXT`:\n - `COMPLICATION.MONOCHROMATIC_IMAGE`\n - `COMPLICATION.MONOCHROMATIC_IMAGE_AMBIENT`\n - `COMPLICATION.TEXT`\n - `COMPLICATION.TITLE`\n- `SMALL_IMAGE`:\n - `COMPLICATION.SMALL_IMAGE`\n - `COMPLICATION.SMALL_IMAGE_AMBIENT`\n - `COMPLICATION.IMAGE_STYLE` - (`PHOTO` = 1, `ICON` = 2)\n- `GOAL_PROGRESS`:\n - `COMPLICATION.GOAL_PROGRESS_VALUE`\n - `COMPLICATION.GOAL_PROGRESS_TARGET_VALUE`\n - `COMPLICATION.TEXT`\n - `COMPLICATION.TITLE`\n - `COMPLICATION.GOAL_PROGRESS_COLORS` - (a space-separated list of hex colors, for example `#FF0000 #00FF00`)\n - `COMPLICATION.GOAL_PROGRESS_COLORS_INTERPOLATE` - (a boolean specifying whether to interpolate colors)\n- `WEIGHTED_ELEMENTS`:\n - `COMPLICATION.WEIGHTED_ELEMENTS_COLORS` - (a space-separated list of hex colors, for example `#FF0000 #00FF00`)\n - `COMPLICATION.WEIGHTED_ELEMENTS_WEIGHTS` - (a space-separated list of element weights)\n - `COMPLICATION.WEIGHTED_ELEMENTS_BACKGROUND_COLOR`\n - `COMPLICATION.TEXT`\n - `COMPLICATION.TITLE`\n\nFor a complete demonstration, see the [example](#example).\n\nIntroduced in Wear OS 4.\n\nSyntax\n------\n\n```xml\n\u003cComplication type=\"SHORT_TEXT | LONG_TEXT | MONOCHROMATIC_IMAGE | SMALL_IMAGE | PHOTO_IMAGE | RANGED_VALUE | EMPTY\"\u003e\n \u003c!-- Only the most common inner element is shown here. --\u003e\n \u003cGroup\u003e\n \u003c/Group\u003e\n\u003c/Complication\u003e\n```\n\nExample\n-------\n\nThe following example shows a complication that contains image, title, and text\ncomponents: \n\n \u003cComplication type=\"SHORT_TEXT\"\u003e\n \u003cPartImage x=\"35\" y=\"16\" width=\"22\" height=\"22\" pivotX=\"0.5\" pivotY=\"0.5\"\n name=\"SomeIcon\" alpha=\"255\"\u003e\n \u003cImage resource=\"[COMPLICATION.MONOCHROMATIC_IMAGE]\"/\u003e\n \u003c/PartImage\u003e\n \u003cPartText x=\"18\" y=\"39\" width=\"56\" height=\"22\" pivotX=\"0.5\" pivotY=\"0.5\"\n name=\"SomeText\" alpha=\"255\"\u003e\n \u003cText align=\"CENTER\" ellipsis=\"TRUE\"\u003e\n \u003cFont family=\"SYNC_TO_DEVICE\" size=\"20\" weight=\"NORMAL\"\n slant=\"NORMAL\" color=\"#ffffffff\"\u003e\n \u003cTemplate\u003e\n %s\n \u003cParameter expression=\"[COMPLICATION.TEXT]\"/\u003e\n \u003c/Template\u003e\n \u003c/Font\u003e\n \u003c/Text\u003e\n \u003c/PartText\u003e\n \u003cPartText x=\"19\" y=\"62\" width=\"54\" height=\"14\" pivotX=\"0.5\" pivotY=\"0.5\"\n name=\"SomeTitle\" alpha=\"255\"\u003e\n \u003cText align=\"CENTER\" ellipsis=\"TRUE\"\u003e\n \u003cFont family=\"SYNC_TO_DEVICE\" size=\"12\" weight=\"NORMAL\"\n slant=\"NORMAL\" color=\"#ffadadad\"\u003e\n \u003cTemplate\u003e\n %s\n \u003cParameter expression=\"[COMPLICATION.TITLE]\"/\u003e\n \u003c/Template\u003e\n \u003c/Font\u003e\n \u003c/Text\u003e\n \u003c/PartText\u003e\n \u003c/Complication\u003e\n\nAttributes\n----------\n\nThe `Complication` element must contain a `type` attribute. The element is\nrendered if the user chooses a matching complication type. See [Complication Types](/training/wearables/wff/group/group) for details.\n\nInner elements\n--------------\n\nThe `Complication` element can contain any number of the following inner\nelements:\n\n- [`Group`](/training/wearables/wff/group/group)\n- [`Condition`](/training/wearables/wff/common/condition)\n- [`PartText`](/training/wearables/wff/group/part/text/part-text)\n- [`PartImage`](/training/wearables/wff/group/part/image/part-image)\n- [`PartAnimatedImage`](/training/wearables/wff/group/part/animated-image/part-animated-image)\n- [`PartDraw`](/training/wearables/wff/group/part/draw/part-draw)\n\nRecommended for you\n-------------------\n\n- Note: link text is displayed when JavaScript is off\n- [WeightedStroke](/training/wearables/wff/v2/group/part/draw/style/weighted-stroke)\n- [WeightedStroke](/training/wearables/wff/group/part/draw/style/weighted-stroke)\n- [ComplicationSlot](/training/wearables/wff/complication/complication-slot)"]]