ComplicationSlotMetadata

public final class ComplicationSlotMetadata


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

Summary

Public fields

final @Nullable 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 @NonNull ComplicationType

The default ComplicationType for the default complication data source.

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(
    @Nullable ComplicationSlotBounds bounds,
    @ComplicationSlotBoundsType int boundsType,
    @NonNull List<@NonNull ComplicationType> supportedTypes,
    @NonNull DefaultComplicationDataSourcePolicy defaultDataSourcePolicy,
    @NonNull ComplicationType defaultDataSourceType,
    boolean isInitiallyEnabled,
    boolean fixedComplicationDataSource,
    @NonNull Bundle complicationConfigExtras
)

Public fields

bounds

@Nullable
public final @Nullable ComplicationSlotBounds bounds

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

boundsType

@NonNull
public final int boundsType

The ComplicationSlotBoundsType of the complication slot.

complicationConfigExtras

@NonNull
public final @NonNull Bundle complicationConfigExtras

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

defaultDataSourcePolicy

@NonNull
public final @NonNull DefaultComplicationDataSourcePolicy defaultDataSourcePolicy

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

defaultDataSourceType

@NonNull
public final @NonNull ComplicationType defaultDataSourceType

The default ComplicationType for the default complication data source.

fixedComplicationDataSource

@NonNull
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

@NonNull
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

@NonNull
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(
    @Nullable ComplicationSlotBounds bounds,
    @ComplicationSlotBoundsType int boundsType,
    @NonNull List<@NonNull ComplicationType> supportedTypes,
    @NonNull DefaultComplicationDataSourcePolicy defaultDataSourcePolicy,
    @NonNull ComplicationType defaultDataSourceType,
    boolean isInitiallyEnabled,
    boolean fixedComplicationDataSource,
    @NonNull Bundle complicationConfigExtras
)
Parameters
@Nullable 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.

@NonNull List<@NonNull ComplicationType> supportedTypes

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

@NonNull DefaultComplicationDataSourcePolicy defaultDataSourcePolicy

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

@NonNull ComplicationType defaultDataSourceType

The default ComplicationType for the default complication data source.

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.

@NonNull Bundle complicationConfigExtras

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