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 by Google 谷歌创建自定义表盘与创建通知和穿戴式设备专用 activity 截然不同。本页介绍了在实现最初几个表盘时可能会遇到的一些问题。
使用相对测量值
不同制造商的 Wear OS 设备的屏幕大小和分辨率各不相同。您的表盘可通过使用相对测量值(而不是绝对像素值)来适应这些变化。
在绘制表盘时,请使用 Canvas.getWidth()
和 Canvas.getHeight()
方法获取画布的大小。然后,使用所检测到的屏幕大小范围内的值来设置图形元素的位置。如果您调整表盘元素的大小以适应提示卡片,请使用属于提示卡片上方剩余空间范围内的值来重新绘制表盘。
表盘示例应用演示了配置表盘的最佳实践。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-07-26。"],[],[],null,["# Address watch face issues\n\nCreating a custom watch face for Wear OS by Google is substantially different from\ncreating notifications and wearable-specific activities. This page describes\nsome issues you might encounter as you implement your first few watch faces.\n\nUse relative measurements\n-------------------------\n\nWear OS devices from different manufacturers feature screens with a variety of sizes and\nresolutions. Your watch face can adapt to these variations by using relative measurements\ninstead of absolute pixel values.\n\nWhen you draw your watch face, obtain the size of the canvas with the\n[Canvas.getWidth()](/reference/android/graphics/Canvas#getWidth())\nand [Canvas.getHeight()](/reference/android/graphics/Canvas#getHeight())\nmethods. Then, set the positions of your\ngraphic elements using values that are some fraction of the detected screen size. If you\nresize the elements of your watch face in response to a peek card, use values that are\nsome fraction of the space remaining above the card to redraw your watch face.\n\nRelated resources\n-----------------\n\nThe [Watch face sample app](https://github.com/android/wear-os-samples) demonstrates the best practices for configuring a watch face."]]