Google is committed to advancing racial equity for Black communities. See how.

Builder

class Builder
kotlin.Any
   ↳ androidx.wear.complications.data.SmallImage.Builder

Builder for MonochromaticImage.

Summary

Public constructors
<init>(image: Icon, type: SmallImageType)

Builder for MonochromaticImage.

Public methods
SmallImage

Builds a SmallImage.

SmallImage.Builder
setAmbientImage(ambientImage: Icon?)

Sets a different image for when the device is ambient mode to save power and prevent burn in.

Public constructors

<init>

Builder(
    image: Icon,
    type: SmallImageType)

Builder for MonochromaticImage.

Parameters
image: Icon the Icon representing the image
type: SmallImageType the style of the image provided, to guide how it should be displayed

Public methods

build

fun build(): SmallImage

Builds a SmallImage.

setAmbientImage

fun setAmbientImage(ambientImage: Icon?): SmallImage.Builder

Sets a different image for when the device is ambient mode to save power and prevent burn in. If no ambient variant is provided, the watch face may not show anything while in ambient mode.