# MediaPlaybackStyle

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/media/model/MediaPlaybackStyle.java+class:androidx.car.app.media.model.MediaPlaybackStyle) 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 MediaPlaybackStyle
```

<br />

*** ** * ** ***

Defines the visual style for a `https://developer.android.com/reference/androidx/car/app/media/model/MediaPlaybackTemplate`.

This style can be used to customize media playback interactive controls and progress indicators, such as their accent color and stroke cap shape.

## Summary

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

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/car/app/media/model/MediaPlaybackStyle#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/media/model/MediaPlaybackStyle#getMediaAccentColor()()` Returns the custom media accent `https://developer.android.com/reference/androidx/car/app/model/CarColor` for interactive controls, or `null` if none was set. |
| `int` | `https://developer.android.com/reference/androidx/car/app/media/model/MediaPlaybackStyle#getProgressBarStrokeCap()()` Returns the `https://developer.android.com/reference/androidx/car/app/model/StrokeCap` shape for the playback progress bar, or `https://developer.android.com/reference/androidx/car/app/model/StrokeCap#DEFAULT()` if not set. |
| `int` | `https://developer.android.com/reference/androidx/car/app/media/model/MediaPlaybackStyle#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/media/model/MediaPlaybackStyle#toString()()` |

## Public methods

### equals

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

### getMediaAccentColor

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

```
public @Nullable CarColor getMediaAccentColor()
```

Returns the custom media accent `https://developer.android.com/reference/androidx/car/app/model/CarColor` for interactive controls, or `null` if none was set.

### getProgressBarStrokeCap

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

```
public int getProgressBarStrokeCap()
```

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

### hashCode

```
public int hashCode()
```

### toString

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