The Watch Face Format is required for watch faces to be installed on devices with Wear OS 5 or later pre-installed and for all new watch faces published on Google Play.
Starting in January 2026, the Watch Face Format will be required for watch faces to be installed on all Wear OS devices.
Learn more about the user-facing changes in this Help Center article.
设计表盘主题
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
自定义表盘利用可包含颜色、动画及上下文信息的动态数字画布。
针对 Wear OS 创建表盘需要清楚地显示时间,就像创建传统表盘一样。Wear OS 设备为表盘提供了一些高级功能(例如鲜艳的颜色、动态背景、动画和数据集成),您可以在自己的设计中加以利用。不过,您还必须考虑许多设计注意事项。
如需以不编写代码的方式设计表盘,请参阅 Watch Face Studio。
若要开始设计表盘,请查看其他表盘示例。请下载 Wear OS 配套应用,浏览各种各样的表盘。
规划表盘实现
在最终确定表盘的设计后,您需要决定如何获取所有必要的数据,以及如何在穿戴式设备上绘制表盘。大多数实现都由下面几部分组成:
- 一张或多张背景图片。
- 用于检索所需数据的应用代码。
- 用于在背景图片上绘制文本和形状的应用代码。
应用通常为互动模式和氛围模式显示不同的背景图片。为氛围模式创建美观的图片可能比较困难。因此,氛围模式的背景往往是全黑或全灰,不带图片。
屏幕密度为 HDPI 的 Wear 设备的背景图片大小应为 320 x 320 像素。背景图片的角在圆形设备上不可见。在您的代码中,您可以检测设备屏幕的尺寸,并在设备的分辨率低于图片的分辨率时缩小背景图片。为了提升性能,应只缩放背景图片 1 次并存储生成的位图。
只在需要时运行应用代码来检索上下文数据,并存储结果,以便在每次绘制表盘时再利用这些数据。例如,您不需要每分钟都提取天气更新信息。
为了延长电池续航时间,用于在氛围模式下绘制表盘的应用代码应相对简单。在此模式下,通常只使用一组有限的颜色来绘制形状的轮廓。而在互动模式下,则可以使用全彩色、复杂的形状、渐变和动画来绘制表盘。
本系列中的剩余课程将向您详细介绍如何实现表盘。
请参阅以下相关资源:
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[],[],null,["# Design watch faces\n\nCustom watch faces leverage a dynamic, digital canvas that can include colors, animations, and\ncontextual information.\n\nCreating a watch face for Wear OS involves visualizing time clearly,\njust as you would for a traditional watch face. Wear devices\nprovide advanced capabilities for watch faces that you can leverage in your designs, such as\nvibrant colors, dynamic backgrounds, animations, and data integration. However, there are\nalso many design considerations to take into account.\n\nTo design a watch face without coding, see\n[Watch Face Studio](https://developer.samsung.com/watch-face-studio/user-guide).\n\nTo begin designing a watch face, review other examples of watch faces. Download the\n[Wear OS companion app](https://play.google.com/store/apps/details?id=com.google.android.wearable.app) to browse a large selection of watch faces.\n\nPlan the implementation of the watch face\n-----------------------------------------\n\nAfter you finalize the design for your watch face, you need to determine how to obtain any\nnecessary data and draw the watch face on the wearable device. Most implementations\nconsist of the following components:\n\n- One or more background images.\n- Application code that retrieves the required data.\n- Application code that draws text and shapes over the background images.\n\nApps typically show different background images for the interactive and\nambient modes. It can be difficult to create a good-looking image for ambient mode.\nTherefore, ambient mode backgrounds are often completely black or grey with no image.\n\nBackground images for Wear devices with a screen density of hdpi should be 320 by 320 pixels in\nsize. The corners of the background image aren't visible on round devices. In your code, you can\ndetect the size of the device screen and scale down the background image if the device has a lower\nresolution than your image. To improve performance, scale the background image only once and store\nthe resulting bitmap.\n\nRun the application code to retrieve contextual data only as often as required\nand store the results to reuse the data every time you draw the watch face. For example, you\ndon't need to fetch weather updates every minute.\n\nKeep the application code that draws your watch face in ambient mode relatively simple to\nincrease battery life. You usually draw outlines of shapes using a limited set of colors\nin this mode. In interactive mode, you can use full color, complex shapes, gradients, and\nanimations to draw your watch face.\n\nThe remaining lessons in this class show you how to implement watch faces in detail.\n\nRelated resources\n-----------------\n\n\nRefer to the following related resources:\n\n- [WatchFace sample](https://github.com/android/wear-os-samples)"]]