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

Builder

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

Builder for RangedValueComplicationData.

You must at a minimum set the value, min, and max fields.

Summary

Public constructors
<init>(value: Float, min: Float, max: Float)

Builder for RangedValueComplicationData.

Public methods
RangedValueComplicationData

Builds the RangedValueComplicationData.

RangedValueComplicationData.Builder

Sets optional icon associated with the complication data.

RangedValueComplicationData.Builder

Sets optional pending intent to be invoked when the complication is tapped.

RangedValueComplicationData.Builder

Sets optional title associated with the complication data.

RangedValueComplicationData.Builder

Sets optional title associated with the complication data.

RangedValueComplicationData.Builder
setValidTimeRange(validTimeRange: TimeRange?)

Sets optional time range during which the complication has to be shown.

Public constructors

<init>

Builder(
    value: Float,
    min: Float,
    max: Float)

Builder for RangedValueComplicationData.

You must at a minimum set the value, min, and max fields.

Public methods

setImage

fun setImage(image: MonochromaticImage?): RangedValueComplicationData.Builder

Sets optional icon associated with the complication data.

setTapAction

fun setTapAction(tapAction: PendingIntent?): RangedValueComplicationData.Builder

Sets optional pending intent to be invoked when the complication is tapped.

setText

fun setText(text: ComplicationText?): RangedValueComplicationData.Builder

Sets optional title associated with the complication data.

setTitle

fun setTitle(title: ComplicationText?): RangedValueComplicationData.Builder

Sets optional title associated with the complication data.

setValidTimeRange

fun setValidTimeRange(validTimeRange: TimeRange?): RangedValueComplicationData.Builder

Sets optional time range during which the complication has to be shown.