# Header

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

*** ** * ** ***


```
@RequiresCarApi(value = 5)
@CarProtocol
class Header
```

<br />

*** ** * ** ***

A component that holds onto data associated with a template's header.

## Summary

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

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/Header#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/Background?` | `@https://developer.android.com/reference/kotlin/androidx/car/app/annotations/ExperimentalCarApi @https://developer.android.com/reference/kotlin/androidx/car/app/annotations/RequiresCarApi(value = 9) https://developer.android.com/reference/kotlin/androidx/car/app/model/Header#getBackground()()` Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/Background` of the component or `null` if not set. |
| `(https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/car/app/model/Action!>` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/Header#getEndHeaderActions()()` Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/Action`s that are set to be displayed at the end of the header, or `null` if not set. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Action?` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/Header#getStartHeaderAction()()` Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/Action` that is set to be displayed at the start of the header, or `null` if not set. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarIcon?` | `@https://developer.android.com/reference/kotlin/androidx/car/app/annotations/ExperimentalCarApi @https://developer.android.com/reference/kotlin/androidx/car/app/annotations/RequiresCarApi(value = 9) https://developer.android.com/reference/kotlin/androidx/car/app/model/Header#getStartHeaderImage()()` Returns the start image of the component or `null` if not set. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarText?` | `@https://developer.android.com/reference/kotlin/androidx/car/app/annotations/ExperimentalCarApi @https://developer.android.com/reference/kotlin/androidx/car/app/annotations/RequiresCarApi(value = 9) https://developer.android.com/reference/kotlin/androidx/car/app/model/Header#getSubtitle()()` Returns the subtitle of the component or `null` if not set. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarText?` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/Header#getTitle()()` Returns the title of the component 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/Header#hashCode()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/Header#toString()()` |

## Public functions

### equals

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

### getBackground

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

```
@ExperimentalCarApi
@RequiresCarApi(value = 9)
fun getBackground(): Background?
```

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

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Header.Builder#setBackground(androidx.car.app.model.Background)` |   |

### getEndHeaderActions

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

```
fun getEndHeaderActions(): (Mutable)List<Action!>
```

Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/Action`s that are set to be displayed at the end of the header, or `null` if not set.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Header.Builder#addEndHeaderAction(androidx.car.app.model.Action)` |   |

### getStartHeaderAction

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

```
fun getStartHeaderAction(): Action?
```

Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/Action` that is set to be displayed at the start of the header, or `null` if not set.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Header.Builder#setStartHeaderAction(androidx.car.app.model.Action)` |   |

### getStartHeaderImage

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

```
@ExperimentalCarApi
@RequiresCarApi(value = 9)
fun getStartHeaderImage(): CarIcon?
```

Returns the start image of the component or `null` if not set.

### getSubtitle

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

```
@ExperimentalCarApi
@RequiresCarApi(value = 9)
fun getSubtitle(): CarText?
```

Returns the subtitle of the component or `null` if not set.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Header.Builder#setSubtitle(java.lang.CharSequence)` |   |

### getTitle

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

```
fun getTitle(): CarText?
```

Returns the title of the component or `null` if not set.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Header.Builder#setTitle(java.lang.CharSequence)` |   |

### hashCode

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

### toString

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