# UserStyleSetting.BooleanUserStyleSetting.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.BooleanUserStyleSetting.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 final class UserStyleSetting.BooleanUserStyleSetting.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.BooleanUserStyleSetting`.

## Summary

| ### Public constructors |
|---|
| `[Builder](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.BooleanUserStyleSetting.Builder#Builder(androidx.wear.watchface.style.UserStyleSetting.Id,kotlin.collections.Collection,kotlin.Boolean,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.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/WatchFaceLayer> affectsWatchFaceLayers, boolean defaultValue, @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 descriptionResourceId )` **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.BooleanUserStyleSetting` | `[build](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.BooleanUserStyleSetting.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.BooleanUserStyleSetting.Builder` | `[setIcon](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.BooleanUserStyleSetting.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.BooleanUserStyleSetting.Builder` | `[setIcon](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.BooleanUserStyleSetting.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.BooleanUserStyleSetting.Builder` | `[setWatchFaceEditorData](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.BooleanUserStyleSetting.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

```
public [Builder](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.BooleanUserStyleSetting.Builder#Builder(androidx.wear.watchface.style.UserStyleSetting.Id,kotlin.collections.Collection,kotlin.Boolean,android.content.res.Resources,kotlin.Int,kotlin.Int))(
    @NonNull UserStyleSetting.Id id,
    @NonNull Collection<@NonNull WatchFaceLayer> affectsWatchFaceLayers,
    boolean defaultValue,
    @NonNull Resources resources,
    @StringRes int displayNameResourceId,
    @StringRes int descriptionResourceId
)
```

> [!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.BooleanUserStyleSetting`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.Id id` | `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.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/WatchFaceLayer> affectsWatchFaceLayers` | Used by the style configuration UI. Describes which watch face rendering layers this style affects. |
| `boolean defaultValue` | The default value of the BooleanUserStyleSetting. |
| `@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.BooleanUserStyleSetting.Builder#(androidx.wear.watchface.style.UserStyleSetting.Id,kotlin.collections.Collection,kotlin.Boolean,android.content.res.Resources,kotlin.Int,kotlin.Int)` and `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.BooleanUserStyleSetting.Builder#(androidx.wear.watchface.style.UserStyleSetting.Id,kotlin.collections.Collection,kotlin.Boolean,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.BooleanUserStyleSetting`, used in the userStyle selection UI. |
| `@https://developer.android.com/reference/androidx/annotation/StringRes int descriptionResourceId` | String resource id for a human readable description displayed under the displayName in the userStyle selection UI. |

## 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.BooleanUserStyleSetting [build](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.BooleanUserStyleSetting.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.BooleanUserStyleSetting`.

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