WatchFace

The root element of every watchface.xml file. It contains information about the elements that should appear in the watch face preview when users choose which watch face to use on their Wear OS devices.

Introduced in Wear OS 4.

Syntax

<WatchFace width="positive-integer" height="positive-integer"
           clipShape="NONE | CIRCLE | RECTANGLE" cornerRadiusX="float"
           cornerRadiusY="float">
  <!-- Only the required inner element is shown here. -->
  <Scene>
  </Scene>
</WatchFace>

Attributes

The WatchFace element must contain the following attributes:

width
Width of the visual screen on which watch face components are drawn, in pixels. All child geometric elements, such as shapes and complications, have their sizes and positions set relative to the visual screen size. Note that the visual screen might be a different size than the display resolution of a physical Wear OS device.
height
Height of the visual screen on which watch face components are drawn, in pixels. All child geometric elements, such as shapes and complications, have their sizes and positions set relative to the visual screen size. Note that the visual screen might be a different size than the display resolution of a physical Wear OS device.

The WatchFace element can also contain the following attributes:

clipShape

The shape of the visual screen to use for the watch face preview. If you use a value of CIRCLE, it's likely that elements near the corners become partially cut off.

The default value is CIRCLE.

cornerRadiusX

The length of half of an ellipse's horizontal axis, which creates round corners. Use this value, along with cornerRadiusY, to create a rounded-rectangle effect.

This value has no effect unless you specify a clipShape of RECTANGLE.

cornerRadiusY

The length of half of an ellipse's vertical axis, which creates round corners. Use this value, along with cornerRadiusY, to create a rounded-rectangle effect.

This value has no effect unless you specify a clipShape of RECTANGLE.

Inner elements

The WatchFace element must contain at least one Scene inner element.

The WatchFace element can also contain the following inner elements: