# SectionHeader

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

*** ** * ** ***


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

<br />

*** ** * ** ***

Represents a header for a section within a `https://developer.android.com/reference/kotlin/androidx/car/app/model/SectionedItemTemplate`.

A section header must include a title. It can also include a start icon, an end icon, and can handle click events.

## Summary

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

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/SectionHeader#IMAGE_TYPE_LARGE() = 2` Represents a large sized image to be displayed in the section header. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/SectionHeader#IMAGE_TYPE_SMALL() = 1` Represents a small icon to be displayed in the section header. |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/SectionHeader#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/CarIcon?` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/SectionHeader#getEndIcon()()` Returns the end icon of the header, or `null` if none is set. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarText?` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/SectionHeader#getHeadline()()` Returns the headline of the header, or `null` if none is set. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/OnClickDelegate?` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/SectionHeader#getOnClickDelegate()()` Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/OnClickDelegate` to handle click events on the header, or `null` if the header is not clickable. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarIcon?` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/SectionHeader#getStartIcon()()` Returns the start icon of the header, or `null` if none is set. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/SectionHeader#getStartIconType()()` Returns the type of the start icon. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarText?` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/SectionHeader#getSubtitle()()` Returns the subtitle of the header, or `null` if none is set. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarText` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/SectionHeader#getTitle()()` Returns the title of the header. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/SectionHeader#hashCode()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/SectionHeader#toString()()` |

## Constants

### IMAGE_TYPE_LARGE

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

```
const val IMAGE_TYPE_LARGE = 2: Int
```

Represents a large sized image to be displayed in the section header.

### IMAGE_TYPE_SMALL

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

```
const val IMAGE_TYPE_SMALL = 1: Int
```

Represents a small icon to be displayed in the section header.

## Public functions

### equals

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

### getEndIcon

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

```
fun getEndIcon(): CarIcon?
```

Returns the end icon of the header, or `null` if none is set.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/SectionHeader.Builder#setEndIcon(androidx.car.app.model.CarIcon)` |   |

### getHeadline

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

```
fun getHeadline(): CarText?
```

Returns the headline of the header, or `null` if none is set.

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

### getOnClickDelegate

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

```
fun getOnClickDelegate(): OnClickDelegate?
```

Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/OnClickDelegate` to handle click events on the header, or `null` if the header is not clickable.

### getStartIcon

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

```
fun getStartIcon(): CarIcon?
```

Returns the start icon of the header, or `null` if none is set.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/SectionHeader.Builder#setStartIcon(androidx.car.app.model.CarIcon)` |   |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/SectionHeader.Builder#setStartIcon(androidx.car.app.model.CarIcon,int)` |   |

### getStartIconType

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

```
fun getStartIconType(): Int
```

Returns the type of the start icon.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/SectionHeader.Builder#setStartIcon(androidx.car.app.model.CarIcon,int)` |   |

### getSubtitle

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

```
fun getSubtitle(): CarText?
```

Returns the subtitle of the header, or `null` if none is set.

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

### getTitle

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

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

Returns the title of the header.

### hashCode

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

### toString

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