# BannerSection

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/BannerSection.java+class:androidx.car.app.model.BannerSection) 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 BannerSection : Section<Banner!>
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.car.app.model.Section](https://developer.android.com/reference/kotlin/androidx/car/app/model/Section)\<[Banner](https://developer.android.com/reference/kotlin/androidx/car/app/model/Banner)!\> ||
|   | ↳ | [androidx.car.app.model.BannerSection](https://developer.android.com/reference/kotlin/androidx/car/app/model/BannerSection) |

*** ** * ** ***

A section within the `SectionedItemTemplate` that contains a `https://developer.android.com/reference/kotlin/androidx/car/app/model/Banner`.

This section is good for displaying transient, high-priority information or alerts with optional actions.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/car/app/model/BannerSection.Builder : https://developer.android.com/reference/kotlin/androidx/car/app/model/Section.BaseBuilder<https://developer.android.com/reference/kotlin/androidx/car/app/model/Banner!, https://developer.android.com/reference/kotlin/androidx/car/app/model/BannerSection.Builder!>` A builder that constructs `https://developer.android.com/reference/kotlin/androidx/car/app/model/BannerSection` instances. |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/BannerSection#equals(java.lang.Object)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/BannerSection#hashCode()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/BannerSection#toString()()` |

### Inherited functions

From [androidx.car.app.model.Section](https://developer.android.com/reference/kotlin/androidx/car/app/model/Section) `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarText?` `https://developer.android.com/reference/kotlin/androidx/car/app/model/Section#getNoItemsMessage()()`

Returns the optional message that should appear if there are no items added to this section.
`https://developer.android.com/reference/kotlin/androidx/car/app/model/OnItemVisibilityChangedDelegate?` `https://developer.android.com/reference/kotlin/androidx/car/app/model/Section#getOnItemVisibilityChangedDelegate()()`

Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/OnItemVisibilityChangedDelegate` to be called when the visible items in this `https://developer.android.com/reference/kotlin/androidx/car/app/model/Section` changes, or `null` if one isn't set.
`https://developer.android.com/reference/kotlin/androidx/car/app/model/SectionHeader?` `@https://developer.android.com/reference/kotlin/androidx/car/app/annotations/RequiresCarApi(value = 9)
@https://developer.android.com/reference/kotlin/androidx/car/app/annotations/ExperimentalCarApi
https://developer.android.com/reference/kotlin/androidx/car/app/model/Section#getSectionHeader()()`

Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/SectionHeader` for this section, 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/Section#getTitle()()`

Returns the optional text that should appear with the items in this section.

## Public functions

### equals

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

### hashCode

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

### toString

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