CarProgressBar.Builder


public final class CarProgressBar.Builder


A builder of CarProgressBar.

Summary

Public constructors

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

Creates a builder with the specified progress.

Public methods

@NonNull CarProgressBar

Constructs the CarProgressBar defined by this builder.

@NonNull CarProgressBar.Builder

Sets the style of the progress bar.

Public constructors

Builder

Added in 1.8.0
public Builder(@FloatRange(from = 0.0, to = 1.0) float progress)

Creates a builder with the specified progress.

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

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

the progress, from 0.0 to 1.0

Throws
java.lang.IllegalArgumentException

if progress is NaN or infinite

Public methods

build

Added in 1.8.0
public @NonNull CarProgressBar build()

Constructs the CarProgressBar defined by this builder.

setStyle

Added in 1.9.0-alpha02
public @NonNull CarProgressBar.Builder setStyle(@NonNull CarProgressBarStyle style)

Sets the style of the progress bar.

Throws
java.lang.NullPointerException

if style is null