UserStyleSetting.LongRangeUserStyleSetting


class UserStyleSetting.LongRangeUserStyleSetting : UserStyleSetting


A LongRangeUserStyleSetting represents a setting with a Long value in the range minimumValue .. maximumValue.

Summary

Nested types

This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Public constructors

LongRangeUserStyleSetting(
    id: UserStyleSetting.Id,
    resources: Resources,
    displayNameResourceId: @StringRes Int,
    descriptionResourceId: @StringRes Int,
    icon: Icon?,
    minimumValue: Long,
    maximumValue: Long,
    affectsWatchFaceLayers: Collection<WatchFaceLayer>,
    defaultValue: Long,
    watchFaceEditorData: UserStyleSetting.WatchFaceEditorData?
)

This function is deprecated. Use the Builder instead

Public functions

open UserStyleSetting.Option

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Public properties

Long

This property is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Long

This property is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Long

This property is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Inherited functions

From androidx.wear.watchface.style.UserStyleSetting
open operator Boolean
equals(other: Any?)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Int

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open String

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Inherited properties

From androidx.wear.watchface.style.UserStyleSetting
Collection<WatchFaceLayer>

This property is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

UserStyleSetting.Option

This property is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Int

This property is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

CharSequence

This property is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

CharSequence

This property is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Icon?

This property is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

UserStyleSetting.Id

This property is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

List<UserStyleSetting.Option>

This property is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

UserStyleSetting.WatchFaceEditorData?

This property is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Public constructors

LongRangeUserStyleSetting

LongRangeUserStyleSetting(
    id: UserStyleSetting.Id,
    resources: Resources,
    displayNameResourceId: @StringRes Int,
    descriptionResourceId: @StringRes Int,
    icon: Icon?,
    minimumValue: Long,
    maximumValue: Long,
    affectsWatchFaceLayers: Collection<WatchFaceLayer>,
    defaultValue: Long,
    watchFaceEditorData: UserStyleSetting.WatchFaceEditorData? = null
)

Constructs a LongRangeUserStyleSetting where LongRangeUserStyleSetting.displayName and LongRangeUserStyleSetting.description are specified as resources.

Parameters
id: UserStyleSetting.Id

Id for the element, must be unique.

resources: Resources

The Resources from which displayNameResourceId and descriptionResourceId are loaded.

displayNameResourceId: @StringRes Int

String resource id for a human readable name for the element, used in the userStyle selection UI.

descriptionResourceId: @StringRes Int

String resource id for a human readable description string displayed under the displayName.

icon: Icon?

Icon 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).

minimumValue: Long

Minimum value (inclusive).

maximumValue: Long

Maximum value (inclusive).

affectsWatchFaceLayers: Collection<WatchFaceLayer>

Used by the style configuration UI. Describes which watch face rendering layers this style affects.

defaultValue: Long

The default value for this LongRangeUserStyleSetting.

watchFaceEditorData: UserStyleSetting.WatchFaceEditorData? = null

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 functions

getOptionForId

open fun getOptionForId(optionId: UserStyleSetting.Option.Id): UserStyleSetting.Option

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

Public properties

defaultValue

Added in 1.0.0
Deprecated in 1.3.0-alpha06
val defaultValueLong

The default value.

maximumValue

Added in 1.0.0
Deprecated in 1.3.0-alpha06
val maximumValueLong

The maximum value.

minimumValue

Added in 1.0.0
Deprecated in 1.3.0-alpha06
val minimumValueLong

The minimum value.