SmallImageComplicationData


class SmallImageComplicationData : ComplicationData


Type used for complications which consist only of a SmallImage.

The image is expected to always be displayed.

A data source that wants to serve a SmallImageComplicationData must include the following meta data in its manifest (NB the value is a comma separated list):

<meta-data android:name="android.support.wearable.complications.SUPPORTED_TYPES"
android:value="SMALL_IMAGE"/>

Summary

Public companion properties

ComplicationType

The ComplicationType corresponding to objects of this type.

Public functions

open Boolean

Returns true if any of the fields of this ComplicationData are placeholders.

open String

Public properties

ComplicationText?

The content description field for accessibility.

SmallImage

The SmallImage that is expected to cover a small fraction of a watch face occupied by a single complication.

Inherited functions

From androidx.wear.watchface.complications.data.ComplicationData
open operator Boolean
equals(other: Any?)
open Instant

Returns the next Instant after afterInstant at which any field of the complication may change.

open Int

Inherited properties

From androidx.wear.watchface.complications.data.ComplicationData
ComponentName?

The ComponentName of the androidx.wear.watchface.complications.datasource.ComplicationDataSourceService that provided the ComplicationData.

Int

The display policy for this complication.

ComplicationData?

Used in case any dynamic value has been invalidated.

Int

The persistence policy for this complication.

PendingIntent?

The PendingIntent to send when the complication is tapped on.

Boolean

tapAction which is a PendingIntent unfortunately can't be serialized.

ComplicationType

The ComplicationType of this complication data.

TimeRange

The TimeRange within which the complication should be displayed.

Public companion properties

TYPE

val TYPEComplicationType

The ComplicationType corresponding to objects of this type.

Public functions

hasPlaceholderFields

open fun hasPlaceholderFields(): Boolean

Returns true if any of the fields of this ComplicationData are placeholders. I.e. if any fields are equal to: ComplicationText.PLACEHOLDER, SmallImage.PLACEHOLDER, MonochromaticImage.PLACEHOLDER, PhotoImageComplicationData.PLACEHOLDER, or RangedValueComplicationData.PLACEHOLDER.

toString

open fun toString(): String

Public properties

contentDescription

Added in 1.0.0
val contentDescriptionComplicationText?

The content description field for accessibility.

smallImage

Added in 1.0.0
val smallImageSmallImage

The SmallImage that is expected to cover a small fraction of a watch face occupied by a single complication. If the smallImage is equal to SmallImage.PLACEHOLDER the renderer must treat it as a placeholder rather than rendering normally, its suggested it should be rendered as a light grey box.