CarProgressBar.Builder


class CarProgressBar.Builder


A builder of CarProgressBar.

Summary

Public constructors

Builder(progress: @FloatRange(from = 0.0, to = 1.0) Float)

Creates a builder with the specified progress.

Public functions

CarProgressBar

Constructs the CarProgressBar defined by this builder.

CarProgressBar.Builder

Sets the color of the progress bar.

Public constructors

Builder

Added in 1.8.0-beta01
Builder(progress: @FloatRange(from = 0.0, to = 1.0) Float)

Creates a builder with the specified progress.

Values outside the range [0.0, 1.0] will be coerced to the nearest bound.

Parameters
progress: @FloatRange(from = 0.0, to = 1.0) Float

the progress, from 0.0 to 1.0

Throws
java.lang.IllegalArgumentException

if progress is NaN or infinite

Public functions

build

Added in 1.8.0-beta01
fun build(): CarProgressBar

Constructs the CarProgressBar defined by this builder.

setColor

Added in 1.8.0-beta01
fun setColor(color: CarColor): CarProgressBar.Builder

Sets the color of the progress bar.

If a color is not set, or if the provided color does not pass a contrast check, the host will use a default color.

Throws
java.lang.NullPointerException

if color is null