ComplicationSlotMetadata


class ComplicationSlotMetadata


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

use Watch Face Format instead

Summary

Public constructors

ComplicationSlotMetadata(
    bounds: ComplicationSlotBounds?,
    boundsType: Int,
    supportedTypes: List<ComplicationType>,
    defaultDataSourcePolicy: DefaultComplicationDataSourcePolicy,
    isInitiallyEnabled: Boolean,
    fixedComplicationDataSource: Boolean,
    complicationConfigExtras: Bundle
)

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

@ComplicationExperimental
ComplicationSlotMetadata(
    bounds: ComplicationSlotBounds?,
    boundsType: Int,
    supportedTypes: List<ComplicationType>,
    defaultDataSourcePolicy: DefaultComplicationDataSourcePolicy,
    isInitiallyEnabled: Boolean,
    fixedComplicationDataSource: Boolean,
    complicationConfigExtras: Bundle,
    boundingArc: BoundingArc?
)

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

Public functions

BoundingArc?

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

Public properties

ComplicationSlotBounds?

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

Int

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

Bundle

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

DefaultComplicationDataSourcePolicy

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

Boolean

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

Boolean

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

List<ComplicationType>

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

Public constructors

ComplicationSlotMetadata

ComplicationSlotMetadata(
    bounds: ComplicationSlotBounds?,
    boundsType: Int,
    supportedTypes: List<ComplicationType>,
    defaultDataSourcePolicy: DefaultComplicationDataSourcePolicy,
    isInitiallyEnabled: Boolean,
    fixedComplicationDataSource: Boolean,
    complicationConfigExtras: Bundle
)

Constructs a ComplicationSlotMetadata.

Parameters
bounds: ComplicationSlotBounds?

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

boundsType: Int

The ComplicationSlotBoundsTypeIntDef of the complication slot.

supportedTypes: List<ComplicationType>

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

defaultDataSourcePolicy: DefaultComplicationDataSourcePolicy

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

isInitiallyEnabled: Boolean

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.

fixedComplicationDataSource: Boolean

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.

complicationConfigExtras: Bundle

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

ComplicationSlotMetadata

@ComplicationExperimental
ComplicationSlotMetadata(
    bounds: ComplicationSlotBounds?,
    boundsType: Int,
    supportedTypes: List<ComplicationType>,
    defaultDataSourcePolicy: DefaultComplicationDataSourcePolicy,
    isInitiallyEnabled: Boolean,
    fixedComplicationDataSource: Boolean,
    complicationConfigExtras: Bundle,
    boundingArc: BoundingArc?
)

Public functions

getBoundingArc

Added in 1.2.0
Deprecated in 1.3.0-alpha06
@ComplicationExperimental
fun getBoundingArc(): BoundingArc?

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

Public properties

bounds

Added in 1.1.0
Deprecated in 1.3.0-alpha06
val boundsComplicationSlotBounds?

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

boundsType

Added in 1.1.0
Deprecated in 1.3.0-alpha06
val boundsTypeInt

The ComplicationSlotBoundsTypeIntDef of the complication slot.

complicationConfigExtras

Added in 1.1.0
Deprecated in 1.3.0-alpha06
val complicationConfigExtrasBundle

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

defaultDataSourcePolicy

Added in 1.1.0
Deprecated in 1.3.0-alpha06
val defaultDataSourcePolicyDefaultComplicationDataSourcePolicy

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

fixedComplicationDataSource

Added in 1.1.0
Deprecated in 1.3.0-alpha06
val fixedComplicationDataSourceBoolean

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

Added in 1.1.0
Deprecated in 1.3.0-alpha06
val isInitiallyEnabledBoolean

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

Added in 1.1.0
Deprecated in 1.3.0-alpha06
val supportedTypesList<ComplicationType>

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