ComplicationSlotState
class ComplicationSlotState
A snapshot of the state of a watch face ComplicationSlot.
use Watch Face Format instead
Summary
Public constructors |
|---|
This function is deprecated. defaultDataSourceType is depreciated |
This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
@ComplicationExperimentalThis function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
Public functions |
|
|---|---|
open operator Boolean |
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 |
boundsType: Int |
The type of the complication's bounds. |
supportedTypes: List<ComplicationType> |
The |
defaultDataSourcePolicy: DefaultComplicationDataSourcePolicy |
The |
defaultDataSourceType: ComplicationType |
The default |
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 |
currentType: ComplicationType |
The |
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 |
boundsType: Int |
The type of the complication's bounds. |
supportedTypes: List<ComplicationType> |
The |
defaultDataSourcePolicy: DefaultComplicationDataSourcePolicy |
The |
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 |
currentType: ComplicationType |
The |
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 |
screenReaderNameResourceId: Int? |
The ID of a string resource (or |
ComplicationSlotState
@ComplicationExperimentalComplicationSlotState(
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 |
boundsType: Int |
The type of the complication's bounds. |
supportedTypes: List<ComplicationType> |
The |
defaultDataSourcePolicy: DefaultComplicationDataSourcePolicy |
The |
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 |
currentType: ComplicationType |
The |
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 |
screenReaderNameResourceId: Int? |
The ID of a string resource (or |
edgeComplicationBoundingArc: BoundingArc? |
The |
Public functions
getBoundingArc
@ComplicationExperimental
fungetBoundingArc(): BoundingArc?
Describes the geometry of an edge complication if specified, or null otherwise.
Public properties
bounds
val bounds: Rect
Screen space bounds of the ComplicationSlot in pixels.
boundsType
val boundsType: Int
The type of the complication's bounds.
complicationConfigExtras
val complicationConfigExtras: Bundle
Extras to be merged into the Intent sent when invoking the complication data source chooser activity.
currentType
val currentType: ComplicationType
The ComplicationType of the complication's current ComplicationData.
defaultDataSourcePolicy
val defaultDataSourcePolicy: DefaultComplicationDataSourcePolicy
The DefaultComplicationDataSourcePolicy for this complication slot.
fixedComplicationDataSource
val fixedComplicationDataSource: Boolean
Whether or not the complication data source is fixed (i.e the user can't configure it).
isEnabled
val isEnabled: Boolean
Whether or not the complication is currently enabled (i.e. it should be drawn.
isInitiallyEnabled
val isInitiallyEnabled: Boolean
Whether or not the complication was initially enabled before considering any ComplicationSlotsOption whose ComplicationSlotOverlays may enable or disable complicationSlots.
nameResourceId
val nameResourceId: Int?
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
val screenReaderNameResourceId: Int?
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
val supportedTypes: List<ComplicationType>
The ComplicationTypes supported by this complication.