# 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)
public final class BannerSection extends Section<Banner>
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.car.app.model.Section](https://developer.android.com/reference/androidx/car/app/model/Section)\<[Banner](https://developer.android.com/reference/androidx/car/app/model/Banner)\> ||
|   | ↳ | [androidx.car.app.model.BannerSection](https://developer.android.com/reference/androidx/car/app/model/BannerSection) |

*** ** * ** ***

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

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

## Summary

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

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/car/app/model/BannerSection#equals(java.lang.Object)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/Object.html other)` |
| `int` | `https://developer.android.com/reference/androidx/car/app/model/BannerSection#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/model/BannerSection#toString()()` |

### Inherited methods

From [androidx.car.app.model.Section](https://developer.android.com/reference/androidx/car/app/model/Section) `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/car/app/model/CarText` `https://developer.android.com/reference/androidx/car/app/model/Section#getNoItemsMessage()()`

Returns the optional message that should appear if there are no items added to this section.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/car/app/model/OnItemVisibilityChangedDelegate` `https://developer.android.com/reference/androidx/car/app/model/Section#getOnItemVisibilityChangedDelegate()()`

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

Returns the `https://developer.android.com/reference/androidx/car/app/model/SectionHeader` for this section, or `null` if not set.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/car/app/model/CarText` `https://developer.android.com/reference/androidx/car/app/model/Section#getTitle()()`

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

## Public methods

### equals

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

### hashCode

```
public int hashCode()
```

### toString

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