# UserStyleSetting.ListUserStyleSetting.ListOption

Artifact: [androidx.wear.watchface:watchface-style](https://developer.android.com/jetpack/androidx/releases/wear-watchface) [View Source](https://cs.android.com/search?q=file:androidx/wear/watchface/style/UserStyleSetting.kt+class:androidx.wear.watchface.style.UserStyleSetting.ListUserStyleSetting.ListOption) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

*** ** * ** ***


```
public final class UserStyleSetting.ListUserStyleSetting.ListOption extends UserStyleSetting.Option
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.wear.watchface.style.UserStyleSetting.Option](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.Option) ||
|   | ↳ | [androidx.wear.watchface.style.UserStyleSetting.ListUserStyleSetting.ListOption](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ListUserStyleSetting.ListOption) |

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Represents choice within a `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ListUserStyleSetting`, these must be enumerated up front.

If `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.Option#childSettings()` is not empty, then an editor needs to treat this as a node in a hierarchy of editor widgets.

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ListUserStyleSetting.ListOption.Builder` **This class is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

| ### Public constructors |
|---|
| `[ListOption](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ListUserStyleSetting.ListOption#ListOption(androidx.wear.watchface.style.UserStyleSetting.Option.Id,android.content.res.Resources,kotlin.Int,android.graphics.drawable.Icon,androidx.wear.watchface.style.UserStyleSetting.WatchFaceEditorData))( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.Option.Id id, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/Resources.html resources, @https://developer.android.com/reference/androidx/annotation/StringRes int displayNameResourceId, https://developer.android.com/reference/android/graphics/drawable/Icon.html icon, https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.WatchFaceEditorData watchFaceEditorData )` **This method is deprecated.** Use the Builder instead |
| `[ListOption](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ListUserStyleSetting.ListOption#ListOption(androidx.wear.watchface.style.UserStyleSetting.Option.Id,android.content.res.Resources,kotlin.Int,android.graphics.drawable.Icon,kotlin.collections.Collection,androidx.wear.watchface.style.UserStyleSetting.WatchFaceEditorData))( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.Option.Id id, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/Resources.html resources, @https://developer.android.com/reference/androidx/annotation/StringRes int displayNameResourceId, https://developer.android.com/reference/android/graphics/drawable/Icon.html icon, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Collection.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting> childSettings, https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.WatchFaceEditorData watchFaceEditorData )` **This method is deprecated.** Use the Builder instead |
| `[ListOption](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ListUserStyleSetting.ListOption#ListOption(androidx.wear.watchface.style.UserStyleSetting.Option.Id,android.content.res.Resources,kotlin.Int,kotlin.Int,android.graphics.drawable.Icon,kotlin.collections.Collection,androidx.wear.watchface.style.UserStyleSetting.WatchFaceEditorData))( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.Option.Id id, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/Resources.html resources, @https://developer.android.com/reference/androidx/annotation/StringRes int displayNameResourceId, @https://developer.android.com/reference/androidx/annotation/StringRes int screenReaderNameResourceId, https://developer.android.com/reference/android/graphics/drawable/Icon.html icon, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Collection.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting> childSettings, https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.WatchFaceEditorData watchFaceEditorData )` **This method is deprecated.** Use the Builder instead |

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html` | `[getDisplayName](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ListUserStyleSetting.ListOption#getDisplayName())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final https://developer.android.com/reference/android/graphics/drawable/Icon.html` | `[getIcon](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ListUserStyleSetting.ListOption#getIcon())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final https://developer.android.com/reference/java/lang/CharSequence.html` | `[getScreenReaderName](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ListUserStyleSetting.ListOption#getScreenReaderName())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.WatchFaceEditorData` | `[getWatchFaceEditorData](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ListUserStyleSetting.ListOption#getWatchFaceEditorData())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

| ### Inherited methods |
|---|
| From [androidx.wear.watchface.style.UserStyleSetting.Option](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.Option) |---|---| | `boolean` | `[equals](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.Option#equals(kotlin.Any))(https://developer.android.com/reference/java/lang/Object.html other)` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. | | `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Collection.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting>` | `[getChildSettings](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.Option#getChildSettings())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. | | `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.Option.Id` | `[getId](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.Option#getId())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. | | `int` | `[hashCode](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.Option#hashCode())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. | | `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `[toString](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.Option#toString())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. | |

## Public constructors

### ListOption

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.1.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.2.0)

```
public [ListOption](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ListUserStyleSetting.ListOption#ListOption(androidx.wear.watchface.style.UserStyleSetting.Option.Id,android.content.res.Resources,kotlin.Int,android.graphics.drawable.Icon,androidx.wear.watchface.style.UserStyleSetting.WatchFaceEditorData))(
    @NonNull UserStyleSetting.Option.Id id,
    @NonNull Resources resources,
    @StringRes int displayNameResourceId,
    Icon icon,
    UserStyleSetting.WatchFaceEditorData watchFaceEditorData
)
```

> [!CAUTION]
> **This method is deprecated.**   
> Use the Builder instead

Constructs a ListOption.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.Option.Id id` | The `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.Option.Id` of this ListOption, must be unique within the `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ListUserStyleSetting`. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/Resources.html resources` | The `https://developer.android.com/reference/android/content/res/Resources.html` used to load `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ListUserStyleSetting.ListOption#(androidx.wear.watchface.style.UserStyleSetting.Option.Id,android.content.res.Resources,kotlin.Int,android.graphics.drawable.Icon,androidx.wear.watchface.style.UserStyleSetting.WatchFaceEditorData)`. |
| `@https://developer.android.com/reference/androidx/annotation/StringRes int displayNameResourceId` | String resource id for a human readable name for the element, used in the userStyle selection UI. This should be short, ideally \< 20 characters. Note if the resource string contains `%1$s` that will get replaced with the 1-based ordinal (1st, 2nd, 3rd etc...) of the ListOption in the list of ListOptions. |
| `https://developer.android.com/reference/android/graphics/drawable/Icon.html icon` | `https://developer.android.com/reference/android/graphics/drawable/Icon.html` for use in the companion style selection UI. This gets sent to the companion over bluetooth and should be small (ideally a few kb in size) |
| `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.WatchFaceEditorData watchFaceEditorData` | Optional data for an on watch face editor, this will not be sent to the companion and its contents may be used in preference to other fields by an on watch face editor. |

### ListOption

```
public [ListOption](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ListUserStyleSetting.ListOption#ListOption(androidx.wear.watchface.style.UserStyleSetting.Option.Id,android.content.res.Resources,kotlin.Int,android.graphics.drawable.Icon,kotlin.collections.Collection,androidx.wear.watchface.style.UserStyleSetting.WatchFaceEditorData))(
    @NonNull UserStyleSetting.Option.Id id,
    @NonNull Resources resources,
    @StringRes int displayNameResourceId,
    Icon icon,
    @NonNull Collection<@NonNull UserStyleSetting> childSettings,
    UserStyleSetting.WatchFaceEditorData watchFaceEditorData
)
```

> [!CAUTION]
> **This method is deprecated.**   
> Use the Builder instead

Constructs a ListOption.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.Option.Id id` | The `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.Option.Id` of this ListOption, must be unique within the `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ListUserStyleSetting`. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/Resources.html resources` | The `https://developer.android.com/reference/android/content/res/Resources.html` used to load `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ListUserStyleSetting.ListOption#(androidx.wear.watchface.style.UserStyleSetting.Option.Id,android.content.res.Resources,kotlin.Int,android.graphics.drawable.Icon,kotlin.collections.Collection,androidx.wear.watchface.style.UserStyleSetting.WatchFaceEditorData)`. |
| `@https://developer.android.com/reference/androidx/annotation/StringRes int displayNameResourceId` | String resource id for a human readable name for the element, used in the userStyle selection UI. This should be short, ideally \< 20 characters. |
| `https://developer.android.com/reference/android/graphics/drawable/Icon.html icon` | `https://developer.android.com/reference/android/graphics/drawable/Icon.html` for use in the style selection UI. This gets sent to the companion over bluetooth and should be small (ideally a few kb in size). |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Collection.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting> childSettings` | The list of child `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting`s, which may be empty. Any child settings must be listed in `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSchema#userStyleSettings()`. |
| `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.WatchFaceEditorData watchFaceEditorData` | Optional data for an on watch face editor, this will not be sent to the companion and its contents may be used in preference to other fields by an on watch face editor. |

### ListOption

```
public [ListOption](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ListUserStyleSetting.ListOption#ListOption(androidx.wear.watchface.style.UserStyleSetting.Option.Id,android.content.res.Resources,kotlin.Int,kotlin.Int,android.graphics.drawable.Icon,kotlin.collections.Collection,androidx.wear.watchface.style.UserStyleSetting.WatchFaceEditorData))(
    @NonNull UserStyleSetting.Option.Id id,
    @NonNull Resources resources,
    @StringRes int displayNameResourceId,
    @StringRes int screenReaderNameResourceId,
    Icon icon,
    @NonNull Collection<@NonNull UserStyleSetting> childSettings,
    UserStyleSetting.WatchFaceEditorData watchFaceEditorData
)
```

> [!CAUTION]
> **This method is deprecated.**   
> Use the Builder instead

Constructs a ListOption.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.Option.Id id` | The `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.Option.Id` of this ListOption, must be unique within the `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ListUserStyleSetting`. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/Resources.html resources` | The `https://developer.android.com/reference/android/content/res/Resources.html` used to load `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ListUserStyleSetting.ListOption#(androidx.wear.watchface.style.UserStyleSetting.Option.Id,android.content.res.Resources,kotlin.Int,kotlin.Int,android.graphics.drawable.Icon,kotlin.collections.Collection,androidx.wear.watchface.style.UserStyleSetting.WatchFaceEditorData)`. |
| `@https://developer.android.com/reference/androidx/annotation/StringRes int displayNameResourceId` | String resource id for a human readable name for the element, used in the userStyle selection UI. This should be short, ideally \< 20 characters. Note if the resource string contains `%1$s` that will get replaced with the 1-based ordinal (1st, 2nd, 3rd etc...) of the ListOption in the list of ListOptions. |
| `@https://developer.android.com/reference/androidx/annotation/StringRes int screenReaderNameResourceId` | String resource id for a human readable name for the element, used by screen readers. This should be more descriptive than `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ListUserStyleSetting.ListOption#(androidx.wear.watchface.style.UserStyleSetting.Option.Id,android.content.res.Resources,kotlin.Int,kotlin.Int,android.graphics.drawable.Icon,kotlin.collections.Collection,androidx.wear.watchface.style.UserStyleSetting.WatchFaceEditorData)`. Note if the resource string contains `%1$s` that will get replaced with the 1-based ordinal (1st, 2nd, 3rd etc...) of the ListOption in the list of ListOptions. Note prior to android T this is ignored by companion editors. |
| `https://developer.android.com/reference/android/graphics/drawable/Icon.html icon` | `https://developer.android.com/reference/android/graphics/drawable/Icon.html` for use in the style selection UI. This gets sent to the companion over bluetooth and should be small (ideally a few kb in size). |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Collection.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting> childSettings` | The list of child `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting`s, which may be empty. Any child settings must be listed in `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSchema#userStyleSettings()`. |
| `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.WatchFaceEditorData watchFaceEditorData` | Optional data for an on watch face editor, this will not be sent to the companion and its contents may be used in preference to other fields by an on watch face editor. |

## Public methods

### getDisplayName

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public final @NonNull CharSequence [getDisplayName](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ListUserStyleSetting.ListOption#getDisplayName())()
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Localized human readable name for the setting, used in the editor style selection UI. This should be short (ideally \< 20 characters).

### getIcon

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public final Icon [getIcon](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ListUserStyleSetting.ListOption#getIcon())()
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Icon for use in the companion style selection UI.

### getScreenReaderName

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.2.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public final CharSequence [getScreenReaderName](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ListUserStyleSetting.ListOption#getScreenReaderName())()
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Optional localized human readable name for the setting, used by screen readers. This should be more descriptive than `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ListUserStyleSetting.ListOption#displayName()`. Note prior to android T this is ignored by companion editors.

### getWatchFaceEditorData

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.1.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public final UserStyleSetting.WatchFaceEditorData [getWatchFaceEditorData](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ListUserStyleSetting.ListOption#getWatchFaceEditorData())()
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Optional data for an on watch face editor, this will not be sent to the companion and its contents may be used in preference to other fields by an on watch face editor.