# 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
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/kotlin/androidx/car/app/model/Row` or `https://developer.android.com/reference/kotlin/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 |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/car/app/model/CarProgressBar.Builder` A builder of `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarProgressBar`. |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarProgressBar#equals(java.lang.Object)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarProgressBar#getProgress()()` Returns the progress between 0.0 and 1.0. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarProgressBarStyle?` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarProgressBar#getStyle()()` Returns the style of the progress bar, or `null` if not set. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarProgressBar#hashCode()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarProgressBar#toString()()` |

## Public functions

### equals

```
fun equals(other: Any?): Boolean
```

### getProgress

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

```
fun getProgress(): Float
```

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)

```
fun getStyle(): CarProgressBarStyle?
```

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

### hashCode

```
fun hashCode(): Int
```

### toString

```
fun toString(): String
```