# CarProgressBarStyle

Artifact: [androidx.car.app:app](https://developer.android.com/jetpack/androidx/releases/car-app) [View Source](https://cs.android.com/search?q=file:androidx/car/app/model/CarProgressBarStyle.java+class:androidx.car.app.model.CarProgressBarStyle) Added in [1.9.0-alpha03](https://developer.android.com/jetpack/androidx/releases/car-app#1.9.0-alpha03)

*** ** * ** ***


```
@CarProtocol
@RequiresCarApi(value = 9)
@ExperimentalCarApi
public final class CarProgressBarStyle
```

<br />

*** ** * ** ***

Defines the visual style of a `https://developer.android.com/reference/androidx/car/app/model/CarProgressBar`.

This style can be used to customize the appearance of the progress bar, such as its color or stroke cap.

Custom styles will fall back to host defaults if they are unset, or if they fail host-enforced contrast requirements.

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/car/app/model/CarProgressBarStyle.Builder` A builder of `https://developer.android.com/reference/androidx/car/app/model/CarProgressBarStyle`. |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/car/app/model/CarProgressBarStyle#equals(java.lang.Object)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/Object.html other)` |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/car/app/model/CarColor` | `https://developer.android.com/reference/androidx/car/app/model/CarProgressBarStyle#getColor()()` Returns the color of the progress bar, or `null` if not set. |
| `int` | `https://developer.android.com/reference/androidx/car/app/model/CarProgressBarStyle#getStrokeCap()()` Returns the stroke cap of the progress bar, or `https://developer.android.com/reference/androidx/car/app/model/StrokeCap#DEFAULT()` if not set. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/car/app/model/CarColor` | `https://developer.android.com/reference/androidx/car/app/model/CarProgressBarStyle#getTrackColor()()` Returns the color of the track behind the indicator, or `null` if not set. |
| `int` | `https://developer.android.com/reference/androidx/car/app/model/CarProgressBarStyle#hashCode()()` |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/car/app/model/CarProgressBarStyle#toString()()` |

## Public methods

### equals

```
public boolean equals(@Nullable Object other)
```

### getColor

Added in [1.9.0-alpha03](https://developer.android.com/jetpack/androidx/releases/car-app#1.9.0-alpha03)

```
public @Nullable CarColor getColor()
```

Returns the color of the progress bar, or `null` if not set.

### getStrokeCap

Added in [1.9.0-alpha03](https://developer.android.com/jetpack/androidx/releases/car-app#1.9.0-alpha03)

```
public int getStrokeCap()
```

Returns the stroke cap of the progress bar, or `https://developer.android.com/reference/androidx/car/app/model/StrokeCap#DEFAULT()` if not set.

### getTrackColor

Added in [1.9.0-alpha03](https://developer.android.com/jetpack/androidx/releases/car-app#1.9.0-alpha03)

```
public @Nullable CarColor getTrackColor()
```

Returns the color of the track behind the indicator, or `null` if not set.

### hashCode

```
public int hashCode()
```

### toString

```
public @NonNull String toString()
```