# 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 />

```
public final 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/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption`.

## Summary

| ### Public constructors |
|---|
| `[Builder](https://developer.android.com/reference/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))( @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/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/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 )` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption` | `[build](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder#build())()` **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.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder` | `[setIcon](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder#setIcon(android.graphics.drawable.Icon))(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/drawable/Icon.html icon)` **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.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder` | `[setIcon](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder#setIcon(kotlin.Function0))(@https://developer.android.com/reference/androidx/annotation/NonNull Function0<https://developer.android.com/reference/android/graphics/drawable/Icon.html> iconProvider)` **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.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder` | `[setWatchFaceEditorData](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder#setWatchFaceEditorData(androidx.wear.watchface.style.UserStyleSetting.WatchFaceEditorData))( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.WatchFaceEditorData watchFaceEditorData )` **This method 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)

```
public [Builder](https://developer.android.com/reference/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))(
    @NonNull UserStyleSetting.Option.Id id,
    @NonNull Collection<@NonNull UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay> complicationSlotOverlays,
    @NonNull Resources resources,
    @StringRes int displayNameResourceId,
    @StringRes int screenReaderNameResourceId
)
```

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

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

| 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 BooleanUserStyleSetting, must be unique. |
| `@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 `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption` is selected. If this is empty then the net result is the initial complication configuration. |
| `@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.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/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. |
| `@https://developer.android.com/reference/androidx/annotation/StringRes int displayNameResourceId` | String resource id for a human readable name for the `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption`, used in the userStyle selection UI. |
| `@https://developer.android.com/reference/androidx/annotation/StringRes int screenReaderNameResourceId` | 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/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder#displayName()`. Note prior to android T this is ignored by companion editors. |

## Public methods

### 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)

```
public final @NonNull UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption [build](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder#build())()
```

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

Constructs the `https://developer.android.com/reference/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)

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

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

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)

```
public final @NonNull UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder [setIcon](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption.Builder#setIcon(kotlin.Function0))(@NonNull Function0<Icon> iconProvider)
```

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

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)

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

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

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.