# UserStyleSetting.ColorUserStyleSetting.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.ColorUserStyleSetting.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.ColorUserStyleSetting.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.ColorUserStyleSetting`.

## Summary

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting` | `[build](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.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.ColorUserStyleSetting.Builder` | `[setDefaultOption](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.Builder#setDefaultOption(androidx.wear.watchface.style.UserStyleSetting.ColorUserStyleSetting.ColorOption))( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.ColorOption defaultOption )` **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.ColorUserStyleSetting.Builder` | `[setIcon](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.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.ColorUserStyleSetting.Builder` | `[setIcon](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.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.ColorUserStyleSetting.Builder` | `[setWatchFaceEditorData](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.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 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.ColorUserStyleSetting [build](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.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.ColorUserStyleSetting`.

### setDefaultOption

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.ColorUserStyleSetting.Builder [setDefaultOption](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.Builder#setDefaultOption(androidx.wear.watchface.style.UserStyleSetting.ColorUserStyleSetting.ColorOption))(
    @NonNull UserStyleSetting.ColorUserStyleSetting.ColorOption defaultOption
)
```

> [!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 the default option. If not specified, the default will be the first element of `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.Builder#options()`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.ColorOption defaultOption` | The default option, used when data isn't persisted. |

### 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.ColorUserStyleSetting.Builder [setIcon](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.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.ColorUserStyleSetting.Builder [setIcon](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.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.ColorUserStyleSetting.Builder [setWatchFaceEditorData](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.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.