ComplicationSlotState


class ComplicationSlotState


A snapshot of the state of a watch face ComplicationSlot.

use Watch Face Format instead

Summary

Public constructors

ComplicationSlotState(
    bounds: Rect,
    boundsType: Int,
    supportedTypes: List<ComplicationType>,
    defaultDataSourcePolicy: DefaultComplicationDataSourcePolicy,
    defaultDataSourceType: ComplicationType,
    isEnabled: Boolean,
    isInitiallyEnabled: Boolean,
    currentType: ComplicationType,
    fixedComplicationDataSource: Boolean,
    complicationConfigExtras: Bundle
)

This function is deprecated. defaultDataSourceType is depreciated

ComplicationSlotState(
    bounds: Rect,
    boundsType: Int,
    supportedTypes: List<ComplicationType>,
    defaultDataSourcePolicy: DefaultComplicationDataSourcePolicy,
    isEnabled: Boolean,
    isInitiallyEnabled: Boolean,
    currentType: ComplicationType,
    fixedComplicationDataSource: Boolean,
    complicationConfigExtras: Bundle,
    nameResourceId: Int?,
    screenReaderNameResourceId: Int?
)

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

@ComplicationExperimental
ComplicationSlotState(
    bounds: Rect,
    boundsType: Int,
    supportedTypes: List<ComplicationType>,
    defaultDataSourcePolicy: DefaultComplicationDataSourcePolicy,
    isEnabled: Boolean,
    isInitiallyEnabled: Boolean,
    currentType: ComplicationType,
    fixedComplicationDataSource: Boolean,
    complicationConfigExtras: Bundle,
    nameResourceId: Int?,
    screenReaderNameResourceId: Int?,
    edgeComplicationBoundingArc: BoundingArc?
)

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

Public functions

open operator Boolean
equals(other: Any?)

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

BoundingArc?

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

open Int

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

open String

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

Public properties

Rect

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.

ComplicationType

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.

ComplicationType

This property is deprecated. Use defaultDataSourcePolicy.systemDataSourceFallbackDefaultType 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.

Boolean

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.

Int?

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

ComplicationSlotState

ComplicationSlotState(
    bounds: Rect,
    boundsType: Int,
    supportedTypes: List<ComplicationType>,
    defaultDataSourcePolicy: DefaultComplicationDataSourcePolicy,
    defaultDataSourceType: ComplicationType,
    isEnabled: Boolean,
    isInitiallyEnabled: Boolean,
    currentType: ComplicationType,
    fixedComplicationDataSource: Boolean,
    complicationConfigExtras: Bundle
)
Parameters
bounds: Rect

Screen space bounds of the ComplicationSlot in pixels.

boundsType: Int

The type of the complication's bounds.

supportedTypes: List<ComplicationType>

The ComplicationTypes supported by this complication.

defaultDataSourcePolicy: DefaultComplicationDataSourcePolicy

The DefaultComplicationDataSourcePolicy for this complication slot.

defaultDataSourceType: ComplicationType

The default ComplicationType for this complication.

isEnabled: Boolean

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

isInitiallyEnabled: Boolean

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

currentType: ComplicationType

The ComplicationType of the complication's current ComplicationData.

fixedComplicationDataSource: Boolean

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

complicationConfigExtras: Bundle

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

ComplicationSlotState

ComplicationSlotState(
    bounds: Rect,
    boundsType: Int,
    supportedTypes: List<ComplicationType>,
    defaultDataSourcePolicy: DefaultComplicationDataSourcePolicy,
    isEnabled: Boolean,
    isInitiallyEnabled: Boolean,
    currentType: ComplicationType,
    fixedComplicationDataSource: Boolean,
    complicationConfigExtras: Bundle,
    nameResourceId: Int?,
    screenReaderNameResourceId: Int?
)
Parameters
bounds: Rect

Screen space bounds of the ComplicationSlot in pixels.

boundsType: Int

The type of the complication's bounds.

supportedTypes: List<ComplicationType>

The ComplicationTypes supported by this complication.

defaultDataSourcePolicy: DefaultComplicationDataSourcePolicy

The DefaultComplicationDataSourcePolicy for this complication slot.

isEnabled: Boolean

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

isInitiallyEnabled: Boolean

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

currentType: ComplicationType

The ComplicationType of the complication's current ComplicationData.

fixedComplicationDataSource: Boolean

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

complicationConfigExtras: Bundle

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

nameResourceId: Int?

The ID of a string resource (or null if absent) to visually identify the complication slot in an editor.

screenReaderNameResourceId: Int?

The ID of a string resource (or null if absent) to identify the complication slot in a screen reader.

ComplicationSlotState

@ComplicationExperimental
ComplicationSlotState(
    bounds: Rect,
    boundsType: Int,
    supportedTypes: List<ComplicationType>,
    defaultDataSourcePolicy: DefaultComplicationDataSourcePolicy,
    isEnabled: Boolean,
    isInitiallyEnabled: Boolean,
    currentType: ComplicationType,
    fixedComplicationDataSource: Boolean,
    complicationConfigExtras: Bundle,
    nameResourceId: Int?,
    screenReaderNameResourceId: Int?,
    edgeComplicationBoundingArc: BoundingArc?
)
Parameters
bounds: Rect

Screen space bounds of the ComplicationSlot in pixels.

boundsType: Int

The type of the complication's bounds.

supportedTypes: List<ComplicationType>

The ComplicationTypes supported by this complication.

defaultDataSourcePolicy: DefaultComplicationDataSourcePolicy

The DefaultComplicationDataSourcePolicy for this complication slot.

isEnabled: Boolean

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

isInitiallyEnabled: Boolean

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

currentType: ComplicationType

The ComplicationType of the complication's current ComplicationData.

fixedComplicationDataSource: Boolean

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

complicationConfigExtras: Bundle

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

nameResourceId: Int?

The ID of a string resource (or null if absent) to visually identify the complication slot in an editor.

screenReaderNameResourceId: Int?

The ID of a string resource (or null if absent) to identify the complication slot in a screen reader.

edgeComplicationBoundingArc: BoundingArc?

The BoundingArc describing the geometry of an edge complication if specified, or null otherwise.

Public functions

equals

open operator fun equals(other: Any?): Boolean

getBoundingArc

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

Describes the geometry of an edge complication if specified, or null otherwise.

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

bounds

Added in 1.0.0
Deprecated in 1.3.0-alpha06
val boundsRect

Screen space bounds of the ComplicationSlot in pixels.

boundsType

Added in 1.0.0
Deprecated in 1.3.0-alpha06
val boundsTypeInt

The type of the complication's bounds.

complicationConfigExtras

Added in 1.0.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.

currentType

Added in 1.0.0
Deprecated in 1.3.0-alpha06
val currentTypeComplicationType

The ComplicationType of the complication's current ComplicationData.

defaultDataSourcePolicy

Added in 1.0.0
Deprecated in 1.3.0-alpha06
val defaultDataSourcePolicyDefaultComplicationDataSourcePolicy

The DefaultComplicationDataSourcePolicy for this complication slot.

defaultDataSourceType

Added in 1.0.0
Deprecated in 1.1.0
val defaultDataSourceTypeComplicationType

The default ComplicationType for this complication.

fixedComplicationDataSource

Added in 1.0.0
Deprecated in 1.3.0-alpha06
val fixedComplicationDataSourceBoolean

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

isEnabled

Added in 1.0.0
Deprecated in 1.3.0-alpha06
val isEnabledBoolean

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

isInitiallyEnabled

Added in 1.0.0
Deprecated in 1.3.0-alpha06
val isInitiallyEnabledBoolean

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

nameResourceId

Added in 1.1.0
Deprecated in 1.3.0-alpha06
val nameResourceIdInt?

The ID of a string resource (or null if absent) to identify the complication slot visually in an editor. This is supposed to be short and without the word complication in it.

screenReaderNameResourceId

Added in 1.1.0
Deprecated in 1.3.0-alpha06
val screenReaderNameResourceIdInt?

The ID of a string resource (or null if absent) to identify the complication slot in a screen reader. This is supposed to be a complete sentence.

supportedTypes

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

The ComplicationTypes supported by this complication.