UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay

class UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay


Overrides to be applied to the corresponding androidx.wear.watchface.ComplicationSlot's initial config (as specified in it's constructor) when the setting is selected.

Summary

Public constructors

ComplicationSlotOverlay(
    complicationSlotId: Int,
    enabled: Boolean?,
    complicationSlotBounds: ComplicationSlotBounds?,
    accessibilityTraversalIndex: Int?
)

This function is deprecated. This constructor is deprecated in favour of the one that specifies optional parameters nameResourceId and screenReaderNameResourceId

ComplicationSlotOverlay(
    complicationSlotId: Int,
    enabled: Boolean?,
    complicationSlotBounds: ComplicationSlotBounds?,
    accessibilityTraversalIndex: Int?,
    nameResourceId: Int?,
    screenReaderNameResourceId: Int?
)

Public functions

open operator Boolean
equals(other: Any?)
open Int
open String

Public properties

Int?

If non null the accessibility traversal index for this configuration.

ComplicationSlotBounds?

If non null, the ComplicationSlotBounds for this configuration.

Int

The id of the androidx.wear.watchface.ComplicationSlot to configure.

Boolean?

If non null, whether the complication should be enabled for this configuration.

Int?

If non null, the string resource identifier for name of the complication slot, for this configuration.

Int?

If non null, the string resource identifier for the screen reader name of the complication slot, for this configuration.

Public constructors

ComplicationSlotOverlay

Added in 1.0.0
Deprecated in 1.2.0
ComplicationSlotOverlay(
    complicationSlotId: Int,
    enabled: Boolean? = null,
    complicationSlotBounds: ComplicationSlotBounds? = null,
    accessibilityTraversalIndex: Int? = null
)

This constructor is deprecated in favour of the one that specifies optional parameters nameResourceId and screenReaderNameResourceId ComplicationSlotOverlay(Int, Boolean?, ComplicationSlotBounds?, Int?, Int?, Int?

ComplicationSlotOverlay

Added in 1.2.0
ComplicationSlotOverlay(
    complicationSlotId: Int,
    enabled: Boolean? = null,
    complicationSlotBounds: ComplicationSlotBounds? = null,
    accessibilityTraversalIndex: Int? = null,
    nameResourceId: Int? = null,
    screenReaderNameResourceId: Int? = null
)
Parameters
complicationSlotId: Int

The id of the androidx.wear.watchface.ComplicationSlot to configure.

enabled: Boolean? = null

If non null, whether the complication should be enabled for this configuration. If null then no changes are made.

complicationSlotBounds: ComplicationSlotBounds? = null

If non null, the ComplicationSlotBounds for this configuration. If null then no changes are made.

accessibilityTraversalIndex: Int? = null

If non null the accessibility traversal index for this configuration. This is used to determine the order in which accessibility labels for the watch face are read to the user.

nameResourceId: Int? = null

If non null, the string resource identifier for name of the complication slot, for this configuration. These strings should be short (perhaps 10 characters max) E.g. complication slots named 'left' and 'right' might be shown by the editor in a list from which the user selects a complication slot for editing.

screenReaderNameResourceId: Int? = null

If non null, the string resource identifier for the screen reader name of the complication slot, for this configuration. While similar to nameResourceId this string can be longer and should be more descriptive. E.g. saying 'left complication' rather than just 'left'.

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

accessibilityTraversalIndex

Added in 1.0.0
val accessibilityTraversalIndexInt?

If non null the accessibility traversal index for this configuration. This is used to determine the order in which accessibility labels for the watch face are read to the user.

complicationSlotBounds

Added in 1.0.0
val complicationSlotBoundsComplicationSlotBounds?

If non null, the ComplicationSlotBounds for this configuration. If null then no changes are made.

complicationSlotId

Added in 1.0.0
val complicationSlotIdInt

The id of the androidx.wear.watchface.ComplicationSlot to configure.

enabled

Added in 1.2.0
val enabledBoolean?

If non null, whether the complication should be enabled for this configuration. If null then no changes are made.

nameResourceId

Added in 1.2.0
val nameResourceIdInt?

If non null, the string resource identifier for name of the complication slot, for this configuration. These strings should be short (perhaps 10 characters max) E.g. complication slots named 'left' and 'right' might be shown by the editor in a list from which the user selects a complication slot for editing.

screenReaderNameResourceId

Added in 1.2.0
val screenReaderNameResourceIdInt?

If non null, the string resource identifier for the screen reader name of the complication slot, for this configuration. While similar to nameResourceId this string can be longer and should be more descriptive. E.g. saying 'left complication' rather than just 'left'.