MonochromaticImageComplicationData


class MonochromaticImageComplicationData : ComplicationData


Type used for complications which consist only of a MonochromaticImage.

The image is expected to always be displayed.

A data source that wants to serve a MonochromaticImageComplicationData 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="ICON"/>

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.

MonochromaticImage

A simple MonochromaticImage image that can be tinted by the watch face (typically with SRC_IN).

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.

monochromaticImage

Added in 1.0.0
val monochromaticImageMonochromaticImage

A simple MonochromaticImage image that can be tinted by the watch face (typically with SRC_IN). If the monochromaticImage is equal to MonochromaticImage.PLACEHOLDER the renderer must treat it as a placeholder rather than rendering normally, it's suggested it should be rendered as a light grey box.