ComplicationSlotMetadata

public final class ComplicationSlotMetadata


Static metadata for a androidx.wear.watchface.ComplicationSlot.

Summary

Public fields

final ComplicationSlotBounds

The complication slot's ComplicationSlotBounds.

final int

The ComplicationSlotBoundsType of the complication slot.

final @NonNull Bundle

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

final @NonNull DefaultComplicationDataSourcePolicy

The DefaultComplicationDataSourcePolicy which controls the initial complication data source when the watch face is first installed.

final boolean

Whether or not the complication slot's complication data source is fixed (i.e.

final boolean

At creation a complication slot is either enabled or disabled.

final @NonNull List<@NonNull ComplicationType>

The list of ComplicationTypes accepted by this complication slot.

Public constructors

ComplicationSlotMetadata(
    ComplicationSlotBounds bounds,
    @ComplicationSlotBoundsType int boundsType,
    List<ComplicationType> supportedTypes,
    DefaultComplicationDataSourcePolicy defaultDataSourcePolicy,
    boolean isInitiallyEnabled,
    boolean fixedComplicationDataSource,
    Bundle complicationConfigExtras
)

Public fields

bounds

public final ComplicationSlotBounds bounds

The complication slot's ComplicationSlotBounds. Only non null for watch faces with a new enough androidx.wear.watchface.control.WatchFaceControlService.

boundsType

public final int boundsType

The ComplicationSlotBoundsType of the complication slot.

complicationConfigExtras

public final @NonNull Bundle complicationConfigExtras

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

defaultDataSourcePolicy

public final @NonNull DefaultComplicationDataSourcePolicy defaultDataSourcePolicy

The DefaultComplicationDataSourcePolicy which controls the initial complication data source when the watch face is first installed.

fixedComplicationDataSource

public final boolean fixedComplicationDataSource

Whether or not the complication slot's complication data source is fixed (i.e. can't be changed by the user). This is useful for watch faces built around specific complication complication data sources.

isInitiallyEnabled

public final boolean isInitiallyEnabled

At creation a complication slot is either enabled or disabled. This can be overridden by a ComplicationSlotsUserStyleSetting (see ComplicationSlotOverlay.enabled). Editors need to know the initial state of a complication slot to predict the effects of making a style change.

supportedTypes

public final @NonNull List<@NonNull ComplicationTypesupportedTypes

The list of ComplicationTypes accepted by this complication slot. Used during complication data source selection, this list should be non-empty.

Public constructors

ComplicationSlotMetadata

public final ComplicationSlotMetadata(
    ComplicationSlotBounds bounds,
    @ComplicationSlotBoundsType int boundsType,
    List<ComplicationType> supportedTypes,
    DefaultComplicationDataSourcePolicy defaultDataSourcePolicy,
    boolean isInitiallyEnabled,
    boolean fixedComplicationDataSource,
    Bundle complicationConfigExtras
)
Parameters
ComplicationSlotBounds bounds

The complication slot's ComplicationSlotBounds. Only non null for watch faces with a new enough androidx.wear.watchface.control.WatchFaceControlService.

@ComplicationSlotBoundsType int boundsType

The ComplicationSlotBoundsType of the complication slot.

List<ComplicationType> supportedTypes

The list of ComplicationTypes accepted by this complication slot. Used during complication data source selection, this list should be non-empty.

DefaultComplicationDataSourcePolicy defaultDataSourcePolicy

The DefaultComplicationDataSourcePolicy which controls the initial complication data source when the watch face is first installed.

boolean isInitiallyEnabled

At creation a complication slot is either enabled or disabled. This can be overridden by a ComplicationSlotsUserStyleSetting (see ComplicationSlotOverlay.enabled). Editors need to know the initial state of a complication slot to predict the effects of making a style change.

boolean fixedComplicationDataSource

Whether or not the complication slot's complication data source is fixed (i.e. can't be changed by the user). This is useful for watch faces built around specific complication complication data sources.

Bundle complicationConfigExtras

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