CarProgressBarStyle.Builder


public final class CarProgressBarStyle.Builder


A builder of CarProgressBarStyle.

Summary

Public constructors

Returns an empty Builder instance.

Creates a new Builder, populated from the input CarProgressBarStyle.

Public methods

@NonNull CarProgressBarStyle

Constructs the CarProgressBarStyle defined by this builder.

@NonNull CarProgressBarStyle.Builder

Sets the color of the progress bar.

@NonNull CarProgressBarStyle.Builder
setStrokeCap(int strokeCap)

Sets the stroke cap of the progress bar.

Public constructors

Builder

Added in 1.9.0-alpha02
public Builder()

Returns an empty Builder instance.

Builder

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

Creates a new Builder, populated from the input CarProgressBarStyle.

Public methods

build

Added in 1.9.0-alpha02
public @NonNull CarProgressBarStyle build()

Constructs the CarProgressBarStyle defined by this builder.

setColor

Added in 1.9.0-alpha02
public @NonNull CarProgressBarStyle.Builder setColor(@Nullable CarColor color)

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.

setStrokeCap

Added in 1.9.0-alpha02
public @NonNull CarProgressBarStyle.Builder setStrokeCap(int strokeCap)

Sets the stroke cap of the progress bar.

If unset, the host will use a default shape defined by the system.