ComplicationSlotState


public final class ComplicationSlotState


A snapshot of the state of a watch face ComplicationSlot.

use Watch Face Format instead

Summary

Public constructors

ComplicationSlotState(
    @NonNull Rect bounds,
    int boundsType,
    @NonNull List<@NonNull ComplicationType> supportedTypes,
    @NonNull DefaultComplicationDataSourcePolicy defaultDataSourcePolicy,
    @NonNull ComplicationType defaultDataSourceType,
    boolean isEnabled,
    boolean isInitiallyEnabled,
    @NonNull ComplicationType currentType,
    boolean fixedComplicationDataSource,
    @NonNull Bundle complicationConfigExtras
)

This method is deprecated. defaultDataSourceType is depreciated

ComplicationSlotState(
    @NonNull Rect bounds,
    int boundsType,
    @NonNull List<@NonNull ComplicationType> supportedTypes,
    @NonNull DefaultComplicationDataSourcePolicy defaultDataSourcePolicy,
    boolean isEnabled,
    boolean isInitiallyEnabled,
    @NonNull ComplicationType currentType,
    boolean fixedComplicationDataSource,
    @NonNull Bundle complicationConfigExtras,
    Integer nameResourceId,
    Integer screenReaderNameResourceId
)

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

@ComplicationExperimental
ComplicationSlotState(
    @NonNull Rect bounds,
    int boundsType,
    @NonNull List<@NonNull ComplicationType> supportedTypes,
    @NonNull DefaultComplicationDataSourcePolicy defaultDataSourcePolicy,
    boolean isEnabled,
    boolean isInitiallyEnabled,
    @NonNull ComplicationType currentType,
    boolean fixedComplicationDataSource,
    @NonNull Bundle complicationConfigExtras,
    Integer nameResourceId,
    Integer screenReaderNameResourceId,
    BoundingArc edgeComplicationBoundingArc
)

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

Public methods

boolean
equals(Object other)

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

final BoundingArc

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

final @NonNull Rect

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

final int

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

final @NonNull Bundle

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

final @NonNull ComplicationType

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

final @NonNull DefaultComplicationDataSourcePolicy

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

final @NonNull ComplicationType

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

final boolean

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

final Integer

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

final Integer

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

final @NonNull List<@NonNull ComplicationType>

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

int

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

final boolean

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

final boolean

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

@NonNull String

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

Public constructors

ComplicationSlotState

public ComplicationSlotState(
    @NonNull Rect bounds,
    int boundsType,
    @NonNull List<@NonNull ComplicationType> supportedTypes,
    @NonNull DefaultComplicationDataSourcePolicy defaultDataSourcePolicy,
    @NonNull ComplicationType defaultDataSourceType,
    boolean isEnabled,
    boolean isInitiallyEnabled,
    @NonNull ComplicationType currentType,
    boolean fixedComplicationDataSource,
    @NonNull Bundle complicationConfigExtras
)
Parameters
@NonNull Rect bounds

Screen space bounds of the ComplicationSlot in pixels.

int boundsType

The type of the complication's bounds.

@NonNull List<@NonNull ComplicationType> supportedTypes

The ComplicationTypes supported by this complication.

@NonNull DefaultComplicationDataSourcePolicy defaultDataSourcePolicy

The DefaultComplicationDataSourcePolicy for this complication slot.

@NonNull ComplicationType defaultDataSourceType

The default ComplicationType for this complication.

boolean isEnabled

Whether or not the complication is currently enabled (i.e. it should be drawn).

boolean isInitiallyEnabled

Whether or not the complication was initially enabled before considering any ComplicationSlotsOption whose ComplicationSlotOverlays may enable or disable complicationSlots.

@NonNull ComplicationType currentType

The ComplicationType of the complication's current ComplicationData.

boolean fixedComplicationDataSource

Whether or not the complication data source is fixed (i.e the user can't configure it).

@NonNull Bundle complicationConfigExtras

Extras to be merged into the Intent sent when invoking the complication data source chooser activity.

ComplicationSlotState

public ComplicationSlotState(
    @NonNull Rect bounds,
    int boundsType,
    @NonNull List<@NonNull ComplicationType> supportedTypes,
    @NonNull DefaultComplicationDataSourcePolicy defaultDataSourcePolicy,
    boolean isEnabled,
    boolean isInitiallyEnabled,
    @NonNull ComplicationType currentType,
    boolean fixedComplicationDataSource,
    @NonNull Bundle complicationConfigExtras,
    Integer nameResourceId,
    Integer screenReaderNameResourceId
)
Parameters
@NonNull Rect bounds

Screen space bounds of the ComplicationSlot in pixels.

int boundsType

The type of the complication's bounds.

@NonNull List<@NonNull ComplicationType> supportedTypes

The ComplicationTypes supported by this complication.

@NonNull DefaultComplicationDataSourcePolicy defaultDataSourcePolicy

The DefaultComplicationDataSourcePolicy for this complication slot.

boolean isEnabled

Whether or not the complication is currently enabled (i.e. it should be drawn).

boolean isInitiallyEnabled

Whether or not the complication was initially enabled before considering any ComplicationSlotsOption whose ComplicationSlotOverlays may enable or disable complicationSlots.

@NonNull ComplicationType currentType

The ComplicationType of the complication's current ComplicationData.

boolean fixedComplicationDataSource

Whether or not the complication data source is fixed (i.e the user can't configure it).

@NonNull Bundle complicationConfigExtras

Extras to be merged into the Intent sent when invoking the complication data source chooser activity.

Integer nameResourceId

The ID of a string resource (or null if absent) to visually identify the complication slot in an editor.

Integer screenReaderNameResourceId

The ID of a string resource (or null if absent) to identify the complication slot in a screen reader.

ComplicationSlotState

@ComplicationExperimental
public ComplicationSlotState(
    @NonNull Rect bounds,
    int boundsType,
    @NonNull List<@NonNull ComplicationType> supportedTypes,
    @NonNull DefaultComplicationDataSourcePolicy defaultDataSourcePolicy,
    boolean isEnabled,
    boolean isInitiallyEnabled,
    @NonNull ComplicationType currentType,
    boolean fixedComplicationDataSource,
    @NonNull Bundle complicationConfigExtras,
    Integer nameResourceId,
    Integer screenReaderNameResourceId,
    BoundingArc edgeComplicationBoundingArc
)
Parameters
@NonNull Rect bounds

Screen space bounds of the ComplicationSlot in pixels.

int boundsType

The type of the complication's bounds.

@NonNull List<@NonNull ComplicationType> supportedTypes

The ComplicationTypes supported by this complication.

@NonNull DefaultComplicationDataSourcePolicy defaultDataSourcePolicy

The DefaultComplicationDataSourcePolicy for this complication slot.

boolean isEnabled

Whether or not the complication is currently enabled (i.e. it should be drawn).

boolean isInitiallyEnabled

Whether or not the complication was initially enabled before considering any ComplicationSlotsOption whose ComplicationSlotOverlays may enable or disable complicationSlots.

@NonNull ComplicationType currentType

The ComplicationType of the complication's current ComplicationData.

boolean fixedComplicationDataSource

Whether or not the complication data source is fixed (i.e the user can't configure it).

@NonNull Bundle complicationConfigExtras

Extras to be merged into the Intent sent when invoking the complication data source chooser activity.

Integer nameResourceId

The ID of a string resource (or null if absent) to visually identify the complication slot in an editor.

Integer screenReaderNameResourceId

The ID of a string resource (or null if absent) to identify the complication slot in a screen reader.

BoundingArc edgeComplicationBoundingArc

The BoundingArc describing the geometry of an edge complication if specified, or null otherwise.

Public methods

equals

public boolean equals(Object other)

getBoundingArc

Added in 1.2.0
Deprecated in 1.3.0-alpha06
@ComplicationExperimental
public final BoundingArc getBoundingArc()

Describes the geometry of an edge complication if specified, or null otherwise.

getBounds

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final @NonNull Rect getBounds()

Screen space bounds of the ComplicationSlot in pixels.

getBoundsType

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final int getBoundsType()

The type of the complication's bounds.

getComplicationConfigExtras

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final @NonNull Bundle getComplicationConfigExtras()

Extras to be merged into the Intent sent when invoking the complication data source chooser activity.

getCurrentType

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final @NonNull ComplicationType getCurrentType()

The ComplicationType of the complication's current ComplicationData.

getDefaultDataSourcePolicy

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final @NonNull DefaultComplicationDataSourcePolicy getDefaultDataSourcePolicy()

The DefaultComplicationDataSourcePolicy for this complication slot.

getDefaultDataSourceType

Added in 1.0.0
Deprecated in 1.1.0
public final @NonNull ComplicationType getDefaultDataSourceType()

The default ComplicationType for this complication.

getFixedComplicationDataSource

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final boolean getFixedComplicationDataSource()

Whether or not the complication data source is fixed (i.e the user can't configure it).

getNameResourceId

Added in 1.1.0
Deprecated in 1.3.0-alpha06
public final Integer getNameResourceId()

The ID of a string resource (or null if absent) to identify the complication slot visually in an editor. This is supposed to be short and without the word complication in it.

getScreenReaderNameResourceId

Added in 1.1.0
Deprecated in 1.3.0-alpha06
public final Integer getScreenReaderNameResourceId()

The ID of a string resource (or null if absent) to identify the complication slot in a screen reader. This is supposed to be a complete sentence.

getSupportedTypes

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final @NonNull List<@NonNull ComplicationTypegetSupportedTypes()

The ComplicationTypes supported by this complication.

hashCode

public int hashCode()

isEnabled

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final boolean isEnabled()

Whether or not the complication is currently enabled (i.e. it should be drawn.

isInitiallyEnabled

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final boolean isInitiallyEnabled()

Whether or not the complication was initially enabled before considering any ComplicationSlotsOption whose ComplicationSlotOverlays may enable or disable complicationSlots.

toString

public @NonNull String toString()