PhotoImageComplicationData


class PhotoImageComplicationData : ComplicationData


Type used for complications which consist only of an image that is expected to fill a large part of the watch face, large enough to be shown as either a background or as part of a high resolution complication.

The image is expected to always be displayed. The image may be shown as the background, any other part of the watch face or within a complication. The image is large enough to be cover the entire screen. The image may be cropped to fit the watch face or complication.

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

Summary

Public companion properties

Icon

Used to signal the photo image should be rendered as a placeholder.

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.

Icon

The Icon that is expected to fill a large part of the watch face, large enough to be shown as either a background or as part of a high resolution 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

PLACEHOLDER

val PLACEHOLDERIcon

Used to signal the photo image should be rendered as a placeholder. It's suggested that a placeholder ranged value be drawn as a grey arc with a percentage value selected by the renderer.

Note a placeholder may only be used in the context of NoDataComplicationData.placeholder.

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.

photoImage

Added in 1.0.0
val photoImageIcon

The Icon that is expected to fill a large part of the watch face, large enough to be shown as either a background or as part of a high resolution complication. This must not be tinted. If the photoImage is equal to PhotoImageComplicationData.PLACEHOLDER the renderer must treat it as a placeholder rather than rendering normally, its suggested it should be rendered as a light grey box.