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

*** ** * ** ***


```
@RequiresCarApi(value = 9)
@ExperimentalCarApi
public final class CondensedItemStyle.Builder
```

<br />

*** ** * ** ***

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

## Summary

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

| ### Public methods |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/model/CondensedItemStyle` | `https://developer.android.com/reference/androidx/car/app/model/CondensedItemStyle.Builder#build()()` Constructs a `https://developer.android.com/reference/androidx/car/app/model/CondensedItemStyle` from the current state of this builder. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/model/CondensedItemStyle.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/car/app/model/CondensedItemStyle.Builder#setBackground(androidx.car.app.model.Background)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/model/Background background)` Sets the `https://developer.android.com/reference/androidx/car/app/model/Background` for the container. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/model/CondensedItemStyle.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/car/app/model/CondensedItemStyle.Builder#setShape(androidx.car.app.model.Shape)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/model/Shape shape)` Sets the `https://developer.android.com/reference/androidx/car/app/model/Shape` for the container. |

## Public constructors

### Builder

Added in 1.9.0-alpha03

```
public Builder()
```

## Public methods

### build

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

```
public @NonNull CondensedItemStyle build()
```

Constructs a `https://developer.android.com/reference/androidx/car/app/model/CondensedItemStyle` 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)

```
@CanIgnoreReturnValue
public @NonNull CondensedItemStyle.Builder setBackground(@NonNull Background background)
```

Sets the `https://developer.android.com/reference/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)

```
@CanIgnoreReturnValue
public @NonNull CondensedItemStyle.Builder setShape(@NonNull Shape shape)
```

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

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