UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay.Builder


public final class UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay.Builder


Constructs a ComplicationSlotOverlay.Builder.

Summary

Public constructors

Builder(int complicationSlotId)

Public methods

final @NonNull UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay
final @NonNull UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay.Builder
setAccessibilityTraversalIndex(int accessibilityTraversalIndex)

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

final @NonNull UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay.Builder
setComplicationSlotBounds(
    @NonNull ComplicationSlotBounds complicationSlotBounds
)

Overrides the complication's per ComplicationSlotBounds.

final @NonNull UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay.Builder
setEnabled(boolean enabled)

Overrides the complication's enabled flag.

final @NonNull UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay.Builder
setNameResourceId(int nameResourceId)

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

final @NonNull UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay.Builder
setScreenReaderNameResourceId(int screenReaderNameResourceId)

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
public Builder(int complicationSlotId)
Parameters
int complicationSlotId

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

Public methods

setAccessibilityTraversalIndex

Added in 1.0.0
public final @NonNull UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay.Builder setAccessibilityTraversalIndex(int accessibilityTraversalIndex)

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
public final @NonNull UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay.Builder setComplicationSlotBounds(
    @NonNull ComplicationSlotBounds complicationSlotBounds
)

Overrides the complication's per ComplicationSlotBounds.

setEnabled

Added in 1.0.0
public final @NonNull UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay.Builder setEnabled(boolean enabled)

Overrides the complication's enabled flag.

setNameResourceId

Added in 1.2.0
public final @NonNull UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay.Builder setNameResourceId(int nameResourceId)

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
public final @NonNull UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay.Builder setScreenReaderNameResourceId(int screenReaderNameResourceId)

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.