ComplicationSlotState
public final class ComplicationSlotState
A snapshot of the state of a watch face ComplicationSlot.
use Watch Face Format instead
Summary
Public constructors |
|---|
This method is deprecated. defaultDataSourceType is depreciated |
This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
@ComplicationExperimentalThis method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
Public methods |
|
|---|---|
boolean |
This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
final BoundingArc |
This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
final @NonNull Rect |
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 ComplicationType |
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 @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. |
final Integer |
This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
final Integer |
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. |
int |
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 boolean |
This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
@NonNull String |
This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
Public constructors
ComplicationSlotState
publicComplicationSlotState(
@NonNull Rect bounds,
int boundsType,
@NonNull List<@NonNull ComplicationType> supportedTypes,
@NonNull DefaultComplicationDataSourcePolicy defaultDataSourcePolicy,
@NonNull ComplicationType defaultDataSourceType,
boolean isEnabled,
boolean isInitiallyEnabled,
@NonNull ComplicationType currentType,
boolean fixedComplicationDataSource,
@NonNull Bundle complicationConfigExtras
)
| Parameters | |
|---|---|
@NonNull Rect bounds |
Screen space bounds of the |
int boundsType |
The type of the complication's bounds. |
@NonNull List<@NonNull ComplicationType> supportedTypes |
The |
@NonNull DefaultComplicationDataSourcePolicy defaultDataSourcePolicy |
The |
@NonNull ComplicationType defaultDataSourceType |
The default |
boolean isEnabled |
Whether or not the complication is currently enabled (i.e. it should be drawn). |
boolean isInitiallyEnabled |
Whether or not the complication was initially enabled before considering any |
@NonNull ComplicationType currentType |
The |
boolean fixedComplicationDataSource |
Whether or not the complication data source is fixed (i.e the user can't configure it). |
@NonNull Bundle complicationConfigExtras |
Extras to be merged into the Intent sent when invoking the complication data source chooser activity. |
ComplicationSlotState
publicComplicationSlotState(
@NonNull Rect bounds,
int boundsType,
@NonNull List<@NonNull ComplicationType> supportedTypes,
@NonNull DefaultComplicationDataSourcePolicy defaultDataSourcePolicy,
boolean isEnabled,
boolean isInitiallyEnabled,
@NonNull ComplicationType currentType,
boolean fixedComplicationDataSource,
@NonNull Bundle complicationConfigExtras,
Integer nameResourceId,
Integer screenReaderNameResourceId
)
| Parameters | |
|---|---|
@NonNull Rect bounds |
Screen space bounds of the |
int boundsType |
The type of the complication's bounds. |
@NonNull List<@NonNull ComplicationType> supportedTypes |
The |
@NonNull DefaultComplicationDataSourcePolicy defaultDataSourcePolicy |
The |
boolean isEnabled |
Whether or not the complication is currently enabled (i.e. it should be drawn). |
boolean isInitiallyEnabled |
Whether or not the complication was initially enabled before considering any |
@NonNull ComplicationType currentType |
The |
boolean fixedComplicationDataSource |
Whether or not the complication data source is fixed (i.e the user can't configure it). |
@NonNull Bundle complicationConfigExtras |
Extras to be merged into the Intent sent when invoking the complication data source chooser activity. |
Integer nameResourceId |
The ID of a string resource (or |
Integer screenReaderNameResourceId |
The ID of a string resource (or |
ComplicationSlotState
@ComplicationExperimental
publicComplicationSlotState(
@NonNull Rect bounds,
int boundsType,
@NonNull List<@NonNull ComplicationType> supportedTypes,
@NonNull DefaultComplicationDataSourcePolicy defaultDataSourcePolicy,
boolean isEnabled,
boolean isInitiallyEnabled,
@NonNull ComplicationType currentType,
boolean fixedComplicationDataSource,
@NonNull Bundle complicationConfigExtras,
Integer nameResourceId,
Integer screenReaderNameResourceId,
BoundingArc edgeComplicationBoundingArc
)
| Parameters | |
|---|---|
@NonNull Rect bounds |
Screen space bounds of the |
int boundsType |
The type of the complication's bounds. |
@NonNull List<@NonNull ComplicationType> supportedTypes |
The |
@NonNull DefaultComplicationDataSourcePolicy defaultDataSourcePolicy |
The |
boolean isEnabled |
Whether or not the complication is currently enabled (i.e. it should be drawn). |
boolean isInitiallyEnabled |
Whether or not the complication was initially enabled before considering any |
@NonNull ComplicationType currentType |
The |
boolean fixedComplicationDataSource |
Whether or not the complication data source is fixed (i.e the user can't configure it). |
@NonNull Bundle complicationConfigExtras |
Extras to be merged into the Intent sent when invoking the complication data source chooser activity. |
Integer nameResourceId |
The ID of a string resource (or |
Integer screenReaderNameResourceId |
The ID of a string resource (or |
BoundingArc edgeComplicationBoundingArc |
The |
Public methods
getBoundingArc
@ComplicationExperimental
public final BoundingArcgetBoundingArc()
Describes the geometry of an edge complication if specified, or null otherwise.
getBounds
public final @NonNull RectgetBounds()
Screen space bounds of the ComplicationSlot in pixels.
getBoundsType
public final int getBoundsType()The type of the complication's bounds.
getComplicationConfigExtras
public final @NonNull BundlegetComplicationConfigExtras()
Extras to be merged into the Intent sent when invoking the complication data source chooser activity.
getCurrentType
public final @NonNull ComplicationTypegetCurrentType()
The ComplicationType of the complication's current ComplicationData.
getDefaultDataSourcePolicy
public final @NonNull DefaultComplicationDataSourcePolicygetDefaultDataSourcePolicy()
The DefaultComplicationDataSourcePolicy for this complication slot.
public final @NonNull ComplicationTypegetDefaultDataSourceType()
The default ComplicationType for this complication.
getFixedComplicationDataSource
public final boolean getFixedComplicationDataSource()Whether or not the complication data source is fixed (i.e the user can't configure it).
getNameResourceId
public final IntegergetNameResourceId()
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.
getScreenReaderNameResourceId
public final IntegergetScreenReaderNameResourceId()
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.
getSupportedTypes
public final @NonNull List<@NonNull ComplicationType>getSupportedTypes()
The ComplicationTypes supported by this complication.
isEnabled
public final boolean isEnabled()Whether or not the complication is currently enabled (i.e. it should be drawn.
isInitiallyEnabled
public final boolean isInitiallyEnabled()Whether or not the complication was initially enabled before considering any ComplicationSlotsOption whose ComplicationSlotOverlays may enable or disable complicationSlots.