# CarProgressBar

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/CarProgressBar.java+class:androidx.car.app.model.CarProgressBar) Added in [1.8.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.8.0)

*** ** * ** ***


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

<br />

*** ** * ** ***

A model that represents a progress bar to display in the car screen.

A progress bar displays the progress of a task or playback. It is a non-interactive element that can be used in templates that support it, such as in a `https://developer.android.com/reference/androidx/car/app/model/Row` or `https://developer.android.com/reference/androidx/car/app/model/GridItem`. \`

The progress bar takes in the progress value as a mandatory field and can optionally set a custom style.

## Summary

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

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/car/app/model/CarProgressBar#equals(java.lang.Object)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/Object.html other)` |
| `float` | `https://developer.android.com/reference/androidx/car/app/model/CarProgressBar#getProgress()()` Returns the progress between 0.0 and 1.0. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/car/app/model/CarProgressBarStyle` | `https://developer.android.com/reference/androidx/car/app/model/CarProgressBar#getStyle()()` Returns the style of the progress bar, or `null` if not set. |
| `int` | `https://developer.android.com/reference/androidx/car/app/model/CarProgressBar#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/CarProgressBar#toString()()` |

## Public methods

### equals

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

### getProgress

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

```
public float getProgress()
```

Returns the progress between 0.0 and 1.0.

### getStyle

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

```
public @Nullable CarProgressBarStyle getStyle()
```

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

### hashCode

```
public int hashCode()
```

### toString

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