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 actual progress bar.

@NonNull CarProgressBarStyle.Builder
setStrokeCap(int strokeCap)

Sets the stroke cap of the progress bar.

@NonNull CarProgressBarStyle.Builder

Sets the color of the track over which the progress bar is drawn.

Public constructors

Builder

Added in 1.9.0-alpha03
public Builder()

Returns an empty Builder instance.

Builder

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

Creates a new Builder, populated from the input CarProgressBarStyle.

Public methods

build

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

Constructs the CarProgressBarStyle defined by this builder.

setColor

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

Sets the color of the actual progress bar. That is, the part of the component that reflects progress and which fully encompasses the component when progress is complete.

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-alpha03
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.

setTrackColor

Added in 1.9.0-alpha03
public @NonNull CarProgressBarStyle.Builder setTrackColor(@Nullable CarColor color)

Sets the color of the track over which the progress bar is drawn.

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