复杂功能
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
复杂功能是表盘上的一种界面元素,可通过一目了然的方式显示用户想全天频繁查看的信息。例如,您可以创建当前天气复杂功能或心率复杂功能。

用户体验原则
以下部分将介绍创建复杂功能时需要注意的原则。
一目了然 |
内容呈现 |
以隐私保护为先 |
复杂功能是小型组件,旨在帮助用户快速完成频繁的任务。务必要让内容简单易懂。 |
如果用户只需抬起手腕就能看到自己需要的内容而无需进行进一步互动,复杂功能最有价值。 |
用户随时随地都会佩戴手表。请考虑复杂功能中的内容与用户所处情境的相关性。 |
用例
被点按后,复杂功能可帮助用户访问应用的特定部分。此类功能还可执行独立的操作。例如,点按饮水计数器复杂功能会更改杯数。

WearOS 会自动包含应用快捷方式复杂功能,因此您无需创建自己的快捷方式,而应着重创建可帮助用户完成所专注任务的复杂功能。
类型
复杂功能类型是指复杂功能中显示或数据源提供的数据类型。复杂功能始终只有 1 个由必填字段和可选字段构成的类型。必填字段包含主要数据。大多数复杂功能类型都会从必填字段中获取名称。您可选择要在表盘中添加的复杂功能数量以及要支持的复杂功能类型。复杂功能有 5 种类型。
类型 |
必填字段 |
选填字段 |
类名称 |
示例 |
SHORT_TEXT |
短文本 |
图标、 防烧屏功能图标、 短标题 |
ShortTextComplicationData |
 |
ICON |
图标 |
防烧屏功能图标 |
MonochromaticImageComplicationData |
 |
RANGED_VALUE |
值 最小值 最大值 |
图标、 防烧屏功能图标、 短文本、 短标题 |
RangedValueComplicationData |
 |
LONG_TEXT |
长文本 |
长标题、 图标、 防烧屏功能图标、 小图片 |
LongTextComplicationData |
 |
SMALL_IMAGE |
小图片 |
|
SmallImageComplicationData |
 |
LARGE_IMAGE |
大图片 |
|
PhotoImageComplicationData |
 |
如需详细了解复杂功能数据源,请参阅复杂功能类型。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-27。
[null,null,["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# Complications\n\nA complication is a UI element on a watch face that contains highly-glanceable\ninformation that users want to see often throughout the day. For example, you\ncould create a current weather complication, or a heart rate complication.\n\nUX Principles\n-------------\n\nThe following sections describe principles to keep in mind when creating\ncomplications.\n\n|------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------|\n| Glanceable ---------- | Content forward --------------- | Privacy first ------------- |\n| Complications are small components designed to help users complete frequent tasks quickly. Make content simple and readable. | Complications are most valuable when the content that the user needs is made visible by simply raising their wrist, without needing further interaction. | The watch travels with the user everywhere they go. Consider how the content in the complications is relevant to the user's context. |\n\nUse cases\n---------\n\nWhen tapped, complications can help users access a specific part of an app.\nThey can also perform a self-contained action. For example, tapping a\nWater Count complication changes the glass count.\n\nWearOS automatically includes an app shortcut complication, so you don't need to\ncreate your own. Instead focus on creating complications that can help users\ncomplete focused tasks.\n\nTypes\n-----\n\nComplication types refer to the kinds of data shown on the complication or\nsupplied by a data source. A complication always has a single type that includes\nrequired and optional fields. A required field contains the primary data. Most\ncomplication types take their name from their required field. You can choose how\nmany complications to include in your watch face and the complication types to\nsupport. There are five complication types.\n\n| Type | Required fields | Optional fields | Class name | Example |\n|--------------|---------------------------|--------------------------------------------------------|--------------------------------------|---------|\n| SHORT_TEXT | Short text | Icon, Burn in protection icon, Short title | `ShortTextComplicationData` | |\n| ICON | Icon | Burn in protection icon | `MonochromaticImageComplicationData` | |\n| RANGED_VALUE | Value Min value Max value | Icon, Burn in protection icon, Short text, Short title | `RangedValueComplicationData` | |\n| LONG_TEXT | Long text | Long title, Icon, Burn in protection icon, Small image | `LongTextComplicationData` | |\n| SMALL_IMAGE | Small image | | `SmallImageComplicationData` | |\n| LARGE_IMAGE | Large image | | `PhotoImageComplicationData` | |\n\nFor more information about complication data sources, see\n[Complication types](/training/wearables/watch-faces/complications#types)."]]