RangedValueComplicationData.Builder

public final class RangedValueComplicationData.Builder


Builder for RangedValueComplicationData.

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

Summary

Public constructors

Builder(
    float value,
    float min,
    float max,
    @NonNull ComplicationText contentDescription
)

Public methods

final @NonNull RangedValueComplicationData

Builds the RangedValueComplicationData.

final @NonNull RangedValueComplicationData.Builder

Sets optional icon associated with the complication data.

final @NonNull RangedValueComplicationData.Builder

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

final @NonNull RangedValueComplicationData.Builder

Sets optional title associated with the complication data.

final @NonNull RangedValueComplicationData.Builder

Sets optional title associated with the complication data.

final @NonNull RangedValueComplicationData.Builder

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

Public constructors

Builder

public final Builder(
    float value,
    float min,
    float max,
    @NonNull ComplicationText contentDescription
)

Public methods

setMonochromaticImage

@NonNull
public final RangedValueComplicationData.Builder setMonochromaticImage(@Nullable MonochromaticImage monochromaticImage)

Sets optional icon associated with the complication data.

setTapAction

@NonNull
public final RangedValueComplicationData.Builder setTapAction(@Nullable PendingIntent tapAction)

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

setText

@NonNull
public final RangedValueComplicationData.Builder setText(@Nullable ComplicationText text)

Sets optional title associated with the complication data.

setTitle

@NonNull
public final RangedValueComplicationData.Builder setTitle(@Nullable ComplicationText title)

Sets optional title associated with the complication data.

setValidTimeRange

@NonNull
public final RangedValueComplicationData.Builder setValidTimeRange(@Nullable TimeRange validTimeRange)

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