UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay.Builder


class UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay.Builder


Constructs a ComplicationSlotOverlay.Builder.

Summary

Public constructors

Builder(complicationSlotId: Int)

Public functions

UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay
UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay.Builder
setAccessibilityTraversalIndex(accessibilityTraversalIndex: Int)

Overrides the androidx.wear.watchface.ComplicationSlot's accessibility traversal index.

UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay.Builder
setComplicationSlotBounds(
    complicationSlotBounds: ComplicationSlotBounds
)

Overrides the complication's per ComplicationSlotBounds.

UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay.Builder
setEnabled(enabled: Boolean)

Overrides the complication's enabled flag.

UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay.Builder
setNameResourceId(nameResourceId: Int)

Overrides the ID of a string resource containing the name of this complication slot, for use by a screen reader.

UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay.Builder
setScreenReaderNameResourceId(screenReaderNameResourceId: Int)

Overrides the ID of a string resource containing the name of this complication slot, for use by a screen reader.

Public constructors

Builder

Added in 1.0.0
Builder(complicationSlotId: Int)
Parameters
complicationSlotId: Int

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

Public functions

setAccessibilityTraversalIndex

Added in 1.0.0
fun setAccessibilityTraversalIndex(accessibilityTraversalIndex: Int): UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay.Builder

Overrides the androidx.wear.watchface.ComplicationSlot's accessibility traversal index. This is used to sort androidx.wear.watchface.ContentDescriptionLabels. If unset we will order the complications by their initial accessibilityTraversalIndex (usually the same as their id).

setComplicationSlotBounds

Added in 1.0.0
fun setComplicationSlotBounds(
    complicationSlotBounds: ComplicationSlotBounds
): UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay.Builder

Overrides the complication's per ComplicationSlotBounds.

setEnabled

Added in 1.0.0
fun setEnabled(enabled: Boolean): UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay.Builder

Overrides the complication's enabled flag.

setNameResourceId

Added in 1.2.0
fun setNameResourceId(nameResourceId: Int): UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay.Builder

Overrides the ID of a string resource containing the name of this complication slot, for use by a screen reader. This resource should be a short sentence. E.g. "Left complication" for the left complication.

setScreenReaderNameResourceId

Added in 1.2.0
fun setScreenReaderNameResourceId(screenReaderNameResourceId: Int): UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay.Builder

Overrides the ID of a string resource containing the name of this complication slot, for use by a screen reader. This resource should be a short sentence. E.g. "Left complication" for the left complication.