# BannerStyle.Builder

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

*** ** * ** ***


```
@RequiresCarApi(value = 9)
@ExperimentalCarApi
class BannerStyle.Builder
```

<br />

*** ** * ** ***

A builder for `https://developer.android.com/reference/kotlin/androidx/car/app/model/BannerStyle`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/BannerStyle.Builder#Builder()()` |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/BannerStyle` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/BannerStyle.Builder#build()()` Constructs a `https://developer.android.com/reference/kotlin/androidx/car/app/model/BannerStyle` from the current state of this builder. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/BannerStyle.Builder` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/BannerStyle.Builder#setBackground(androidx.car.app.model.Background)(background: https://developer.android.com/reference/kotlin/androidx/car/app/model/Background)` Sets the `https://developer.android.com/reference/kotlin/androidx/car/app/model/Background` for the container. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/BannerStyle.Builder` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/BannerStyle.Builder#setShape(androidx.car.app.model.Shape)(shape: https://developer.android.com/reference/kotlin/androidx/car/app/model/Shape)` Sets the `https://developer.android.com/reference/kotlin/androidx/car/app/model/Shape` for the container. |

## Public constructors

### Builder

Added in 1.9.0-alpha03

```
Builder()
```

## Public functions

### build

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

```
fun build(): BannerStyle
```

Constructs a `https://developer.android.com/reference/kotlin/androidx/car/app/model/BannerStyle` from the current state of this builder.

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalStateException.html` | if both shape and background are `null` |

### setBackground

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

```
fun setBackground(background: Background): BannerStyle.Builder
```

Sets the `https://developer.android.com/reference/kotlin/androidx/car/app/model/Background` for the container.

`background` must conform to .

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/NullPointerException.html` | if `background` is `null` |
| `https://developer.android.com/reference/java/lang/IllegalArgumentException.html` | if `background` contains unsupported type |

### setShape

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

```
fun setShape(shape: Shape): BannerStyle.Builder
```

Sets the `https://developer.android.com/reference/kotlin/androidx/car/app/model/Shape` for the container.

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/NullPointerException.html` | if `shape` is `null` |