# UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder

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.Builder) Added in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

*** ** * ** ***

<br />

```
class UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder
```

<br />

*** ** * ** ***

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

A Builder for `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption`.

## Summary

| ### Public constructors |
|---|
| `[Builder](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder#Builder(androidx.wear.watchface.style.UserStyleSetting.Option.Id,kotlin.collections.Collection,android.content.res.Resources,kotlin.Int,kotlin.Int))( id: https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.Option.Id, complicationSlotOverlays: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-collection/index.html<https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay>, resources: https://developer.android.com/reference/android/content/res/Resources.html, displayNameResourceId: @https://developer.android.com/reference/kotlin/androidx/annotation/StringRes https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, screenReaderNameResourceId: @https://developer.android.com/reference/kotlin/androidx/annotation/StringRes https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption` | `[build](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder#build())()` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder` | `[setIcon](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder#setIcon(android.graphics.drawable.Icon))(icon: https://developer.android.com/reference/android/graphics/drawable/Icon.html)` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder` | `[setIcon](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder#setIcon(kotlin.Function0))(iconProvider: () -> https://developer.android.com/reference/android/graphics/drawable/Icon.html?)` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder` | `[setWatchFaceEditorData](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder#setWatchFaceEditorData(androidx.wear.watchface.style.UserStyleSetting.WatchFaceEditorData))( watchFaceEditorData: https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.WatchFaceEditorData )` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

## Public constructors

### Builder

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

```
[Builder](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder#Builder(androidx.wear.watchface.style.UserStyleSetting.Option.Id,kotlin.collections.Collection,android.content.res.Resources,kotlin.Int,kotlin.Int))(
    id: UserStyleSetting.Option.Id,
    complicationSlotOverlays: Collection<UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay>,
    resources: Resources,
    displayNameResourceId: @StringRes Int,
    screenReaderNameResourceId: @StringRes Int
)
```

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

Constructs a builder for `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption`.

| Parameters |
|---|---|
| `id: https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.Option.Id` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.Option.Id` for the BooleanUserStyleSetting, must be unique. |
| `complicationSlotOverlays: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-collection/index.html<https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay>` | Overlays to be applied when this `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption` is selected. If this is empty then the net result is the initial complication configuration. |
| `resources: https://developer.android.com/reference/android/content/res/Resources.html` | The `https://developer.android.com/reference/android/content/res/Resources.html` from which `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder#(androidx.wear.watchface.style.UserStyleSetting.Option.Id,kotlin.collections.Collection,android.content.res.Resources,kotlin.Int,kotlin.Int)` and `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder#(androidx.wear.watchface.style.UserStyleSetting.Option.Id,kotlin.collections.Collection,android.content.res.Resources,kotlin.Int,kotlin.Int)` are loaded. |
| `displayNameResourceId: @https://developer.android.com/reference/kotlin/androidx/annotation/StringRes https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | String resource id for a human readable name for the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption`, used in the userStyle selection UI. |
| `screenReaderNameResourceId: @https://developer.android.com/reference/kotlin/androidx/annotation/StringRes https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | String resource id for a human readable name for the setting, used by screen readers. This should be more descriptive than `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder#displayName()`. Note prior to android T this is ignored by companion editors. |

## Public functions

### build

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

```
fun [build](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder#build())(): UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption
```

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

Constructs the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption`.

### setIcon

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

```
fun [setIcon](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder#setIcon(android.graphics.drawable.Icon))(icon: Icon): UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder
```

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

Sets an `https://developer.android.com/reference/android/graphics/drawable/Icon.html` for use in the companion userStyle selection UI. This gets sent to the companion over bluetooth and should be small (ideally a few kb in size).

### setIcon

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

```
fun [setIcon](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder#setIcon(kotlin.Function0))(iconProvider: () -> Icon?): UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder
```

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

Sets a provider of an `https://developer.android.com/reference/android/graphics/drawable/Icon.html` for use in the companion userStyle selection UI. This gets lazily evaluated and is sent to the companion over bluetooth and should be small (ideally a few kb in size). Note this is not guaranteed to be called on the calling thread. Note it will be called shortly after watch face initialization completes.

### setWatchFaceEditorData

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

```
fun [setWatchFaceEditorData](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder#setWatchFaceEditorData(androidx.wear.watchface.style.UserStyleSetting.WatchFaceEditorData))(
    watchFaceEditorData: UserStyleSetting.WatchFaceEditorData
): UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder
```

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

Sets 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.