Set the level of transparency that this element should have. A value of 0
indicates that the element should be completely transparent. A value of 255
indicates that the element should be completely opaque.
The element's render mode type. Possible values are: SOURCE (default),
MASK, or ALL.
tintColor
Apply a tint color filter to the element. You must specify the color using
either the ARGB format (#ff000000 = opaque black) or the RGB format
(#000000 = black).
From Wear 5.1: Sets the blendMode for drawing this PartText (this
element is treated as the src).
Inner elements
The PartText element can contain the following inner elements. All elements
are optional, except that either Text or TextCircular must be one of the
inner elements. A PartText element can contain an unlimited number of each
inner element -- except for Text, TextCircular, Localization, Gyro,
Launch, and ScreenReader, which can appear at most 1 time each.
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-06-03 UTC.
[null,null,["Last updated 2025-06-03 UTC."],[],[],null,["# PartText\n\nWatch Face Format version Version 4 Version 3 Version 2 Version 1\n\n*** ** * ** ***\n\nRepresents the part of a watch face that contains exactly one text layout\nelement.\n\nIntroduced in Wear OS 4.\n\nSyntax\n------\n\n```xml\n\u003cPartText x=\"integer\" y=\"integer\" width=\"integer\" height=\"integer\"\n pivotX=\"float\" pivotY=\"float\" angle=\"float-degrees\" alpha=\"integer\"\n name=\"string\" scaleX=\"float\" scaleY=\"float\"\n renderMode=\"[SOURCE | MASK | ALL]\" \n blendMode=\"string\"\n tintColor=\"argb-color | rgb-color\"\u003e\n \u003c!-- Text-specific child elements. --\u003e\n \u003cText\u003e\n \u003c!-- There must be raw text as the leaf inner element within a\n \"PartText\" element tree. --\u003e\n \u003cFont family=\"font\" size=\"20\" color=\"#00FFFF\"\u003eHello world\n \u003c/Font\u003e\n \u003cFont\u003e\n \u003c!-- Example of a text decoration element. --\u003e\n \u003cOutline\u003e\n \u003c!-- Example of a template with 2 string values. --\u003e\n \u003cTemplate\u003e%s %s\n \u003cParameter expression=\"[MONTH_S]\" /\u003e\n \u003cParameter expression=\"[DAY]\" /\u003e\n \u003c/Template\u003e\n \u003c/Outline\u003e\n \u003c!-- Example of a text formatting element. --\u003e\n \u003cUpper\u003e\n \u003cTemplate ... /\u003e\n \u003c/Upper\u003e\n \u003cTemplate ... /\u003e\n \u003c/Font\u003e\n \u003c/Text\u003e\n \u003c!-- A \"PartText\" element can contain this \"TextCircular\" element instead\n of a \"Text\" element. --\u003e\n \u003cTextCircular centerX=\"180\" centerY=\"180\" direction=\"COUNTER_CLOCKWISE\"\n endAngle=\"90\" height=\"340\" width=\"340\" startAngle=\"270\"\u003e\n \u003c!-- There must be raw text as the leaf inner element within a \"PartText\"\n element tree. --\u003e\n \u003cFont family=\"font\" size=\"20\" color=\"#00FFFF\"\u003eHello world\n \u003c/Font\u003e\n \u003cFont\u003e\n Example of a text decoration element.\n \u003cOutline\u003e\n Example of a template with 2 string values.\n \u003cTemplate\u003e%s %s\n \u003cParameter expression=\"[MONTH_S]\" /\u003e\n \u003cParameter expression=\"[DAY]\" /\u003e\n \u003c/Template\u003e\n \u003c/Outline\u003e\n Example of a text formatting element.\n \u003cUpper\u003e\n \u003cTemplate ... /\u003e\n \u003c/Upper\u003e\n \u003cTemplate ... /\u003e\n \u003c/Font\u003e\n \u003c/TextCircular /\u003e\n --\u003e\n\n \u003c!-- Child elements that are shared across all \"Part\" elements. --\u003e\n \u003cLocalization .../\u003e\n \u003cTransform .../\u003e\n \u003cVariant .../\u003e\n \u003cGyro .../\u003e\n \u003cLaunch .../\u003e\n \u003cScreenReader .../\u003e\n\u003c/PartText\u003e\n```\n\nAttributes\n----------\n\nThe `PartText` element has the following attributes:\n\n### Required attributes\n\nThe following attributes are required:\n\n`x`, `y`, `width`, `height`\n\n: A collection of integers that specify the element's size and position.\n\n These attributes are [transformable](/reference/wear-os/wff/common/transform/transform).\n\n### Optional attributes\n\nThe following attributes are optional:\n\n`pivotX`, `pivotY`\n\n: A two-dimensional pivot point about which the element rotates. Both values\n are floating-point numbers that are scaled to fit in the range $ \\[0, 1\\] $.\n\n These attributes are [transformable](/reference/wear-os/wff/common/transform/transform).\n\n`angle`\n\n: A number of degrees, clockwise, that the element should be rotated about its\n pivot point.\n\n This attribute is [transformable](/reference/wear-os/wff/common/transform/transform).\n\n`alpha`\n\n: Set the level of transparency that this element should have. A value of `0`\n indicates that the element should be completely transparent. A value of `255`\n indicates that the element should be completely opaque.\n\n This attribute is [transformable](/reference/wear-os/wff/common/transform/transform).\n\n`name`\n\n: A string that identifies this element. Useful if you need to refer to this\n element from another location within your watch face file.\n\n`scaleX`\n\n: The horizontal scaling factor to apply to this element.\n\n This attribute is [transformable](/reference/wear-os/wff/common/transform/transform).\n\n`scaleY`\n\n: The vertical scaling factor to apply to this element.\n\n This attribute is [transformable](/reference/wear-os/wff/common/transform/transform).\n\n[`renderMode`](/training/wearables/wff/effects#clipping)\n\n: The element's render mode type. Possible values are: `SOURCE` (default),\n `MASK`, or `ALL`.\n\n`tintColor`\n\n: Apply a tint color filter to the element. You must specify the color using\n either the ARGB format (`#ff000000` = opaque black) or the RGB format\n (`#000000` = black).\n\n From version 4, this attribute is [transformable](/reference/wear-os/wff/common/transform/transform).\n\n[`blendMode`](/training/wearables/wff/effects#blend-mode)\n\n: *From Wear 5.1* : Sets the [`blendMode`](/reference/wear-os/wff/common/attributes/blend-mode) for drawing this `PartText` (this\n element is treated as the *src*).\n\nInner elements\n--------------\n\nThe `PartText` element can contain the following inner elements. All elements\nare optional, except that either `Text` or `TextCircular` must be one of the\ninner elements. A `PartText` element can contain an unlimited number of each\ninner element -- except for `Text`, `TextCircular`, `Localization`, `Gyro`,\n`Launch`, and `ScreenReader`, which can appear at most 1 time each.\n\n- [`Text`](/reference/wear-os/wff/group/part/text/text)\n- [`TextCircular`](/reference/wear-os/wff/group/part/text/text-circular)\n- [`Localization`](/reference/wear-os/wff/common/localization)\n- [`Transform`](/reference/wear-os/wff/common/transform/transform)\n- [`Variant`](/reference/wear-os/wff/common/variant/variant)\n- [`Gyro`](/reference/wear-os/wff/common/transform/gyro)\n- [`Launch`](/reference/wear-os/wff/common/launch)\n- [`ScreenReader`](/reference/wear-os/wff/common/screen-reader)\n\nRecommended for you\n-------------------\n\n- Note: link text is displayed when JavaScript is off\n- [PartText](/reference/wear-os/wff/group/part/text/part-text)\n- [Group](/reference/wear-os/wff/group/group)\n- [PartImage](/reference/wear-os/wff/group/part/image/part-image)"]]