UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption


class UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption : UserStyleSetting.Option


Represents an override to the initial androidx.wear.watchface.ComplicationSlotsManager configuration.

Summary

Nested types

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

Public constructors

ComplicationSlotsOption(
    id: UserStyleSetting.Option.Id,
    resources: Resources,
    displayNameResourceId: @StringRes Int,
    icon: Icon?,
    complicationSlotOverlays: Collection<UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay>,
    watchFaceEditorData: UserStyleSetting.WatchFaceEditorData?
)

This function is deprecated. Use the Builder instead

ComplicationSlotsOption(
    id: UserStyleSetting.Option.Id,
    resources: Resources,
    displayNameResourceId: @StringRes Int,
    screenReaderNameResourceId: @StringRes Int,
    icon: Icon?,
    complicationSlotOverlays: Collection<UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay>,
    watchFaceEditorData: UserStyleSetting.WatchFaceEditorData?
)

This function is deprecated. Use the Builder instead

Public properties

Collection<UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay>

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.

CharSequence?

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.

Inherited functions

From androidx.wear.watchface.style.UserStyleSetting.Option
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.Option
Collection<UserStyleSetting>

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

UserStyleSetting.Option.Id

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

Public constructors

ComplicationSlotsOption

Added in 1.1.0
Deprecated in 1.2.0
ComplicationSlotsOption(
    id: UserStyleSetting.Option.Id,
    resources: Resources,
    displayNameResourceId: @StringRes Int,
    icon: Icon?,
    complicationSlotOverlays: Collection<UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay>,
    watchFaceEditorData: UserStyleSetting.WatchFaceEditorData? = null
)

Constructs a ComplicationSlotsOption with displayName constructed from Resources.

Parameters
id: UserStyleSetting.Option.Id

Id for the element, must be unique.

resources: Resources

The Resources from which displayNameResourceId is load.

displayNameResourceId: @StringRes Int

String resource id for a human readable name for the element, used in the userStyle selection UI. This should be short, ideally < 20 characters. Note if the resource string contains %1$s that will get replaced with the 1-based ordinal (1st, 2nd, 3rd etc...) of the ComplicationSlotsOption in the list of ComplicationSlotsOptions.

icon: Icon?

Icon for use in the companion style selection UI. This gets sent to the companion over bluetooth and should be small (ideally a few kb in size).

complicationSlotOverlays: Collection<UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay>

Overlays to be applied when this ComplicationSlotsOption is selected. If this is empty then the net result is the initial complication configuration.

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.

ComplicationSlotsOption

Added in 1.2.0
Deprecated in 1.3.0-alpha06
ComplicationSlotsOption(
    id: UserStyleSetting.Option.Id,
    resources: Resources,
    displayNameResourceId: @StringRes Int,
    screenReaderNameResourceId: @StringRes Int,
    icon: Icon?,
    complicationSlotOverlays: Collection<UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay>,
    watchFaceEditorData: UserStyleSetting.WatchFaceEditorData? = null
)

Constructs a ComplicationSlotsUserStyleSetting with displayName constructed from Resources.

Parameters
id: UserStyleSetting.Option.Id

Id for the element, must be unique.

resources: Resources

The Resources from which displayNameResourceId is load.

displayNameResourceId: @StringRes Int

String resource id for a human readable name for the element, used in the userStyle selection UI. This should be short, ideally < 20 characters. Note if the resource string contains %1$s that will get replaced with the 1-based ordinal (1st, 2nd, 3rd etc...) of the ComplicationSlotsOption in the list of ComplicationSlotsOptions.

screenReaderNameResourceId: @StringRes Int

String resource id for a human readable name for the element, used by screen readers. This should be more descriptive than displayNameResourceId. Note if the resource string contains %1$s that will get replaced with the 1-based ordinal (1st, 2nd, 3rd etc...) of the ComplicationSlotsOption in the list of ComplicationSlotsOptions. Note prior to android T this is ignored by companion editors.

icon: Icon?

Icon for use in the companion style selection UI. This gets sent to the companion over bluetooth and should be small (ideally a few kb in size).

complicationSlotOverlays: Collection<UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay>

Overlays to be applied when this ComplicationSlotsOption is selected. If this is empty then the net result is the initial complication configuration.

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 properties

complicationSlotOverlays

Added in 1.0.0
Deprecated in 1.3.0-alpha06
val complicationSlotOverlaysCollection<UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay>

Overlays to be applied when this ComplicationSlotsOption is selected. If this is empty then the net result is the initial complication configuration.

displayName

Added in 1.0.0
Deprecated in 1.3.0-alpha06
val displayNameCharSequence

Localized human readable name for the setting, used in the editor style selection UI. This should be short (ideally < 20 characters).

icon

Added in 1.0.0
Deprecated in 1.3.0-alpha06
val iconIcon?

Icon for use in the companion style selection UI.

screenReaderName

Added in 1.2.0
Deprecated in 1.3.0-alpha06
val screenReaderNameCharSequence?

Optional localized human readable name for the setting, used by screen readers. This should be more descriptive than displayName. Note prior to android T this is ignored by companion editors.

watchFaceEditorData

Added in 1.1.0
Deprecated in 1.3.0-alpha06
val watchFaceEditorDataUserStyleSetting.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.