# UserStyleSetting.CustomValueUserStyleSetting

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.CustomValueUserStyleSetting) 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.CustomValueUserStyleSetting extends UserStyleSetting
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.wear.watchface.style.UserStyleSetting](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting) ||
|   | ↳ | [androidx.wear.watchface.style.UserStyleSetting.CustomValueUserStyleSetting](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.CustomValueUserStyleSetting) |

*** ** * ** ***

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

An application specific style setting. This style is ignored by the system editor. This is expected to be used in conjunction with an on watch face editor. Only a single `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting` or `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.LargeCustomValueUserStyleSetting` is permitted in the `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSchema`.

The `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.CustomValueUserStyleSetting.CustomValueOption` can store at most `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.Option.Id#MAX_LENGTH()` bytes. If you need more storage, consider using `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.LargeCustomValueUserStyleSetting`.

## Summary

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

| ### Public constructors |
|---|
| `[CustomValueUserStyleSetting](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.CustomValueUserStyleSetting#CustomValueUserStyleSetting(kotlin.collections.Collection,kotlin.ByteArray))( @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, @https://developer.android.com/reference/androidx/annotation/NonNull byte[] defaultValue )` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

| ### Public methods |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.Option` | `[getOptionForId](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.CustomValueUserStyleSetting#getOptionForId(androidx.wear.watchface.style.UserStyleSetting.Option.Id))(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.Option.Id optionId)` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

| ### Inherited methods |
|---|
| From [androidx.wear.watchface.style.UserStyleSetting](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting) |---|---| | `boolean` | `[equals](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting#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/WatchFaceLayer>` | `[getAffectedWatchFaceLayers](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting#getAffectedWatchFaceLayers())()` **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` | `[getDefaultOption](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting#getDefaultOption())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. | | `final int` | `[getDefaultOptionIndex](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting#getDefaultOptionIndex())()` **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` | `[getDescription](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting#getDescription())()` **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#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#getIcon())()` **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.Id` | `[getId](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting#getId())()` **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/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.Option>` | `[getOptions](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting#getOptions())()` **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#getWatchFaceEditorData())()` **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#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#toString())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. | |

## Public constructors

### CustomValueUserStyleSetting

```
public [CustomValueUserStyleSetting](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.CustomValueUserStyleSetting#CustomValueUserStyleSetting(kotlin.collections.Collection,kotlin.ByteArray))(
    @NonNull Collection<@NonNull WatchFaceLayer> affectsWatchFaceLayers,
    @NonNull byte[] defaultValue
)
```

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

| Parameters |
|---|---|
| `@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. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull byte[] defaultValue` | The default value `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html`. |

## Public methods

### getOptionForId

```
public @NonNull UserStyleSetting.Option [getOptionForId](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.CustomValueUserStyleSetting#getOptionForId(androidx.wear.watchface.style.UserStyleSetting.Option.Id))(@NonNull UserStyleSetting.Option.Id optionId)
```

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

Translates an option name into an option. This will need to be overridden for userStyle categories that can't sensibly be fully enumerated (e.g. a full 24-bit color picker).

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.Option.Id optionId` | The `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.Option.Id` of the option |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.Option` | An `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.Option` corresponding to the name. This could either be one of the options from `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting`s or a newly constructed Option depending on the nature of the UserStyleSetting. If optionName is unrecognized then the default value for the setting should be returned. |