ComplicationSlotMetadata


public final class ComplicationSlotMetadata

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

use Watch Face Format instead

Summary

Public methods

final BoundingArc

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

final ComplicationSlotBounds

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 DefaultComplicationDataSourcePolicy

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

Public constructors

ComplicationSlotMetadata

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

Constructs a ComplicationSlotMetadata.

ComplicationSlotMetadata

@ComplicationExperimental
public ComplicationSlotMetadata(
 ComplicationSlotBounds bounds,
 int boundsType,
 @NonNull List<@NonNull ComplicationType> supportedTypes,
 @NonNull DefaultComplicationDataSourcePolicy defaultDataSourcePolicy,
 boolean isInitiallyEnabled,
 boolean fixedComplicationDataSource,
 @NonNull Bundle complicationConfigExtras,
 BoundingArc boundingArc
)

Public methods

getBoundingArc

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

The optional BoundingArc for an edge complication if specified, or null otherwise.

getBounds

Added in 1.1.0
Deprecated in 1.3.0-alpha07
public final ComplicationSlotBounds getBounds()

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

getBoundsType

Added in 1.1.0
Deprecated in 1.3.0-alpha07
public final int getBoundsType()

The ComplicationSlotBoundsTypeIntDef of the complication slot.

getComplicationConfigExtras

Added in 1.1.0
Deprecated in 1.3.0-alpha07
public final @NonNull Bundle getComplicationConfigExtras()

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

getDefaultDataSourcePolicy

Added in 1.1.0
Deprecated in 1.3.0-alpha07
public final @NonNull DefaultComplicationDataSourcePolicy getDefaultDataSourcePolicy()

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

getFixedComplicationDataSource

Added in 1.1.0
Deprecated in 1.3.0-alpha07
public final boolean getFixedComplicationDataSource()

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.

getSupportedTypes

Added in 1.1.0
Deprecated in 1.3.0-alpha07
public final @NonNull List<@NonNull ComplicationType> getSupportedTypes()

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

isInitiallyEnabled

Added in 1.1.0
Deprecated in 1.3.0-alpha07
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.