# TabStyle

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

*** ** * ** ***


```
@RequiresCarApi(value = 9)
@ExperimentalCarApi
@CarProtocol
class TabStyle
```

<br />

*** ** * ** ***

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

This style can be used to customize the appearance of the visual container around a tab, such as its shape (corner radius), selected background color, and text color.

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

## Summary

| ### Nested types |
|---|
| `@https://developer.android.com/reference/kotlin/androidx/car/app/annotations/RequiresCarApi(value = 9) @https://developer.android.com/reference/kotlin/androidx/car/app/annotations/ExperimentalCarApi class https://developer.android.com/reference/kotlin/androidx/car/app/model/TabStyle.Builder` A builder for `https://developer.android.com/reference/kotlin/androidx/car/app/model/TabStyle`. |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/TabStyle#equals(java.lang.Object)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarColor?` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/TabStyle#getSelectedBackgroundColor()()` Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarColor` of the selected tab container background, or `null` if not set. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Shape?` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/TabStyle#getShape()()` Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/Shape` of the container, or `null` if not set. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarColor?` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/TabStyle#getTextColor()()` Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarColor` of the text within the tab container, 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/TabStyle#hashCode()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/TabStyle#toString()()` |

## Public functions

### equals

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

### getSelectedBackgroundColor

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

```
fun getSelectedBackgroundColor(): CarColor?
```

Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarColor` of the selected tab container background, or `null` if not set.

### getShape

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

```
fun getShape(): Shape?
```

Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/Shape` of the container, or `null` if not set.

### getTextColor

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

```
fun getTextColor(): CarColor?
```

Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarColor` of the text within the tab container, or `null` if not set.

### hashCode

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

### toString

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