MonochromaticImageComplicationData
class MonochromaticImageComplicationData : ComplicationData
kotlin.Any | ||
↳ | androidx.wear.complications.data.ComplicationData | |
↳ | androidx.wear.complications.data.MonochromaticImageComplicationData |
Type used for complications which consist only of a MonochromaticImage.
The image is expected to always be displayed.
The contentDescription field and is used to describe what data the icon represents. If the icon is purely stylistic, and does not convey any information to the user, then provide an empty content description. If no content description is provided, a generic content description will be used instead.
Summary
Nested classes | |
---|---|
Builder for MonochromaticImageComplicationData. |
Public methods | |
---|---|
WireComplicationData |
Converts this value to WireComplicationData object used for serialization. |
Boolean |
isActiveAt(dateTimeMillis: Long) Returns true if the complication is active and should be displayed at the given time. |
Properties | |
---|---|
ComplicationText? | |
MonochromaticImage | |
TimeRange? |
Companion properties | |
---|---|
ComplicationType |
The ComplicationType corresponding to objects of this type. |
Inherited properties | |
---|---|
Public methods
asWireComplicationData
fun asWireComplicationData(): WireComplicationData
Converts this value to WireComplicationData object used for serialization.
This is only needed internally to convert to the underlying communication protocol.
isActiveAt
fun isActiveAt(dateTimeMillis: Long): Boolean
Returns true if the complication is active and should be displayed at the given time. If this returns false, the complication should not be displayed.
This must be checked for any time for which the complication will be displayed.
Properties
contentDescription
val contentDescription: ComplicationText?
monochromaticImage
val monochromaticImage: MonochromaticImage
validTimeRange
val validTimeRange: TimeRange?