ComplicationSlotState

public final class ComplicationSlotState


A snapshot of the state of a watch face ComplicationSlot.

Summary

Public fields

final @NonNull Rect

Screen space bounds of the ComplicationSlot in pixels.

final int

The type of the complication's bounds.

final @NonNull Bundle

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

final @NonNull ComplicationType

The ComplicationType of the complication's current ComplicationData.

final @NonNull DefaultComplicationDataSourcePolicy

The DefaultComplicationDataSourcePolicy for this complication slot.

final @NonNull ComplicationType

This field is deprecated. Use defaultDataSourcePolicy.systemDataSourceFallbackDefaultType instead

final boolean

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

final boolean

Whether or not the complication is currently enabled (i.e.

final boolean

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

final @NonNull List<@NonNull ComplicationType>

The ComplicationTypes supported by this complication.

Public constructors

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

Public fields

bounds

public final @NonNull Rect bounds

Screen space bounds of the ComplicationSlot in pixels.

boundsType

@ComplicationSlotBoundsType
public final int boundsType

The type of the complication's bounds.

complicationConfigExtras

public final @NonNull Bundle complicationConfigExtras

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

currentType

public final @NonNull ComplicationType currentType

The ComplicationType of the complication's current ComplicationData.

defaultDataSourcePolicy

public final @NonNull DefaultComplicationDataSourcePolicy defaultDataSourcePolicy

The DefaultComplicationDataSourcePolicy for this complication slot.

defaultDataSourceType

public final @NonNull ComplicationType defaultDataSourceType

The default ComplicationType for this complication.

fixedComplicationDataSource

public final boolean fixedComplicationDataSource

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

isEnabled

public final boolean isEnabled

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

isInitiallyEnabled

public final boolean isInitiallyEnabled

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

supportedTypes

public final @NonNull List<@NonNull ComplicationTypesupportedTypes

The ComplicationTypes supported by this complication.

Public constructors

ComplicationSlotState

public final ComplicationSlotState(
    Rect bounds,
    @ComplicationSlotBoundsType int boundsType,
    List<ComplicationType> supportedTypes,
    DefaultComplicationDataSourcePolicy defaultDataSourcePolicy,
    boolean isEnabled,
    boolean isInitiallyEnabled,
  &n