# UserStyleSetting.DoubleRangeUserStyleSetting

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.DoubleRangeUserStyleSetting) 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.DoubleRangeUserStyleSetting 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.DoubleRangeUserStyleSetting](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.DoubleRangeUserStyleSetting) |

*** ** * ** ***

> [!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 DoubleRangeUserStyleSetting represents a setting with a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html` value in the range `[minimumValue .. maximumValue]`.

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.DoubleRangeUserStyleSetting.Builder` **This class is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `public final class https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.DoubleRangeUserStyleSetting.DoubleRangeOption 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 |
|---|
| `[DoubleRangeUserStyleSetting](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.DoubleRangeUserStyleSetting#DoubleRangeUserStyleSetting(androidx.wear.watchface.style.UserStyleSetting.Id,android.content.res.Resources,kotlin.Int,kotlin.Int,android.graphics.drawable.Icon,kotlin.Double,kotlin.Double,kotlin.collections.Collection,kotlin.Double,androidx.wear.watchface.style.UserStyleSetting.WatchFaceEditorData))( @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/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, https://developer.android.com/reference/android/graphics/drawable/Icon.html icon, double minimumValue, double maximumValue, @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, double defaultValue, https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.WatchFaceEditorData watchFaceEditorData )` **This method is deprecated.** Use the Builder instead |

| ### Public methods |
|---|---|
| `final double` | `[getDefaultValue](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.DoubleRangeUserStyleSetting#getDefaultValue())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final double` | `[getMaximumValue](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.DoubleRangeUserStyleSetting#getMaximumValue())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final double` | `[getMinimumValue](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.DoubleRangeUserStyleSetting#getMinimumValue())()` **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/androidx/wear/watchface/style/UserStyleSetting.Option` | `[getOptionForId](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.DoubleRangeUserStyleSetting#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

### DoubleRangeUserStyleSetting

```
public [DoubleRangeUserStyleSetting](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.DoubleRangeUserStyleSetting#DoubleRangeUserStyleSetting(androidx.wear.watchface.style.UserStyleSetting.Id,android.content.res.Resources,kotlin.Int,kotlin.Int,android.graphics.drawable.Icon,kotlin.Double,kotlin.Double,kotlin.collections.Collection,kotlin.Double,androidx.wear.watchface.style.UserStyleSetting.WatchFaceEditorData))(
    @NonNull UserStyleSetting.Id id,
    @NonNull Resources resources,
    @StringRes int displayNameResourceId,
    @StringRes int descriptionResourceId,
    Icon icon,
    double minimumValue,
    double maximumValue,
    @NonNull Collection<@NonNull WatchFaceLayer> affectsWatchFaceLayers,
    double defaultValue,
    UserStyleSetting.WatchFaceEditorData watchFaceEditorData
)
```

> [!CAUTION]
> **This method is deprecated.**   
> Use the Builder instead

Constructs a DoubleRangeUserStyleSetting where `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting#displayName()` and `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting#description()` are specified as resources.

| 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 element, must be unique. |
| `@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.DoubleRangeUserStyleSetting#(androidx.wear.watchface.style.UserStyleSetting.Id,android.content.res.Resources,kotlin.Int,kotlin.Int,android.graphics.drawable.Icon,kotlin.Double,kotlin.Double,kotlin.collections.Collection,kotlin.Double,androidx.wear.watchface.style.UserStyleSetting.WatchFaceEditorData)` and `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.DoubleRangeUserStyleSetting#(androidx.wear.watchface.style.UserStyleSetting.Id,android.content.res.Resources,kotlin.Int,kotlin.Int,android.graphics.drawable.Icon,kotlin.Double,kotlin.Double,kotlin.collections.Collection,kotlin.Double,androidx.wear.watchface.style.UserStyleSetting.WatchFaceEditorData)` are loaded. |
| `@https://developer.android.com/reference/androidx/annotation/StringRes int displayNameResourceId` | String resource id for a human readable name for the element, used in the userStyle selection UI. |
| `@https://developer.android.com/reference/androidx/annotation/StringRes int descriptionResourceId` | String resource id for a human readable description string displayed under the displayName. |
| `https://developer.android.com/reference/android/graphics/drawable/Icon.html icon` | `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). |
| `double minimumValue` | Minimum value (inclusive). |
| `double maximumValue` | Maximum value (inclusive). |
| `@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. |
| `double defaultValue` | The default value for this DoubleRangeUserStyleSetting. |
| `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.WatchFaceEditorData watchFaceEditorData` | 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. |

## Public methods

### getDefaultValue

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

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

Returns the default value.

### getMaximumValue

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

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

Returns the maximum value.

### getMinimumValue

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

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

Returns the minimum value.

### getOptionForId

```
public @NonNull UserStyleSetting.Option [getOptionForId](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.DoubleRangeUserStyleSetting#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

We support all values in the range min ... max not just min \& max.