# UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption

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.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption) 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.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption 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.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption) |

*** ** * ** ***

> [!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 an override to the initial `https://developer.android.com/reference/androidx/wear/watchface/ComplicationSlotsManager` configuration.

## Summary

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

| ### Public constructors |
|---|
| `[ComplicationSlotsOption](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption#ComplicationSlotsOption(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.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay> complicationSlotOverlays, https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.WatchFaceEditorData watchFaceEditorData )` **This method is deprecated.** Use the Builder instead |
| `[ComplicationSlotsOption](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption#ComplicationSlotsOption(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.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay> complicationSlotOverlays, 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/util/Collection.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay>` | `[getComplicationSlotOverlays](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption#getComplicationSlotOverlays())()` **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/lang/CharSequence.html` | `[getDisplayName](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption#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.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption#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.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption#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.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption#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

### ComplicationSlotsOption

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 [ComplicationSlotsOption](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption#ComplicationSlotsOption(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.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay> complicationSlotOverlays,
    UserStyleSetting.WatchFaceEditorData watchFaceEditorData
)
```

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

Constructs a ComplicationSlotsOption with `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption#displayName()` constructed from Resources.

| Parameters |
|---|---|
| `@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/wear/watchface/style/UserStyleSetting.Option.Id` for the element, must be unique. |
| `@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` from which `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption#(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)` is load. |
| `@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 ComplicationSlotsOption in the list of ComplicationSlotsOptions. |
| `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/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.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay> complicationSlotOverlays` | Overlays to be applied when this ComplicationSlotsOption is selected. If this is empty then the net result is the initial complication configuration. |
| `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. |

### ComplicationSlotsOption

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 [ComplicationSlotsOption](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption#ComplicationSlotsOption(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.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay> complicationSlotOverlays,
    UserStyleSetting.WatchFaceEditorData watchFaceEditorData
)
```

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

Constructs a ComplicationSlotsUserStyleSetting with `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption#displayName()` constructed from Resources.

| Parameters |
|---|---|
| `@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/wear/watchface/style/UserStyleSetting.Option.Id` for the element, must be unique. |
| `@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` from which `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption#(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)` is load. |
| `@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 ComplicationSlotsOption in the list of ComplicationSlotsOptions. |
| `@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.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption#(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 ComplicationSlotsOption in the list of ComplicationSlotsOptions. 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 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/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.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay> complicationSlotOverlays` | Overlays to be applied when this ComplicationSlotsOption is selected. If this is empty then the net result is the initial complication configuration. |
| `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

### getComplicationSlotOverlays

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 Collection<@NonNull UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay> [getComplicationSlotOverlays](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption#getComplicationSlotOverlays())()
```

> [!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

Overlays to be applied when this ComplicationSlotsOption is selected. If this is empty then the net result is the initial complication configuration.

### 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.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption#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.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption#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.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption#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.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption#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.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption#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.