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" highlight="image resource"> <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
idof one of the innerListOptionelements.
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.
highlightAn overlay image that helps to highlight the area of change for this configuration option on the watch face, which may be shown by editors that support it.
The image should have a transparent background, and be tintable. The aspect ratio of the image should match that of the watch face, and the image should also show the boundary of the area affected by the configuration change.
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.
Recommended for you
- Note: link text is displayed when JavaScript is off
- ListConfiguration
- Flavor
- Flavor