UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay


public final 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(
    int complicationSlotId,
    Boolean enabled,
    ComplicationSlotBounds complicationSlotBounds,
    Integer accessibilityTraversalIndex
)

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

ComplicationSlotOverlay(
    int complicationSlotId,
    Boolean enabled,
    ComplicationSlotBounds complicationSlotBounds,
    Integer accessibilityTraversalIndex,
    Integer nameResourceId,
    Integer screenReaderNameResourceId
)

Public methods

boolean
equals(Object other)
final Integer

If non null the accessibility traversal index for this configuration.

final ComplicationSlotBounds

If non null, the ComplicationSlotBounds for this configuration.

final int

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

final Integer

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

final Integer

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

int
final Boolean

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

@NonNull String

Public constructors

ComplicationSlotOverlay

Added in 1.0.0
Deprecated in 1.2.0
public ComplicationSlotOverlay(
    int complicationSlotId,
    Boolean enabled,
    ComplicationSlotBounds complicationSlotBounds,
    Integer accessibilityTraversalIndex
)

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
public ComplicationSlotOverlay(
    int complicationSlotId,
    Boolean enabled,
    ComplicationSlotBounds complicationSlotBounds,
    Integer accessibilityTraversalIndex,
    Integer nameResourceId,
    Integer screenReaderNameResourceId
)
Parameters
int complicationSlotId

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

Boolean enabled

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

ComplicationSlotBounds complicationSlotBounds

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

Integer accessibilityTraversalIndex

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.

Integer nameResourceId

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.

Integer screenReaderNameResourceId

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 methods

equals

public boolean equals(Object other)

getAccessibilityTraversalIndex

Added in 1.0.0
public final Integer getAccessibilityTraversalIndex()

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.

getComplicationSlotBounds

Added in 1.0.0
public final ComplicationSlotBounds getComplicationSlotBounds()

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

getComplicationSlotId

Added in 1.0.0
public final int getComplicationSlotId()

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

getNameResourceId

Added in 1.2.0
public final Integer getNameResourceId()

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.

getScreenReaderNameResourceId

Added in 1.2.0
public final Integer getScreenReaderNameResourceId()

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'.

hashCode

public int hashCode()

isEnabled

Added in 1.2.0
public final Boolean isEnabled()

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

toString

public @NonNull String toString()