ListConfiguration

A List Configuration allows the user to select one item from a list when customizing the watch face in the watch face editor.

Introduced in Wear OS 4.

Syntax

<ListConfiguration id="string" displayName="string" icon="string"
                         screenReaderText="string" defaultValue="string"
>
  <ListOption id="string" displayName="string" screenReaderText="string"
                  icon="string" />
  ...
</ListConfiguration>

Attributes

The ListConfiguration element has the following attributes:

Required attributes

The following attributes are required:

id
A unique identifier for the configuration value.
displayName
A resource ID corresponding to the text that is displayed in the watch face editor.
defaultValue
The default configuration value used if the user does not explicitly change the configuration in the watch face editor. This should be set to the id of one of the inner ListOption elements.

Optional attributes

The following attributes are optional:

icon
A resource ID corresponding to the drawable resource which is shown in the watch face editor.
screenReaderText
A resource ID corresponding to the text which is used if the user has TalkBack enabled.

Inner elements

The ListConfiguration element can contain between 1 and 100 inner ListOption elements.

ListOption Attributes

The ListOption element must contain the following attributes:

id
A unique identifier for the option value.
displayName
A resource ID corresponding to the text that is displayed in the watch face editor.

The ListOption element can optionally contain the following attributes:

icon
A resource ID corresponding to the drawable resource which is shown in the watch face editor. This should have a maximum size of 400x400 px.
screenReaderText
A resource ID corresponding to the text which is used if the user has TalkBack enabled.