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

*** ** * ** ***


```
class Row.Builder
```

<br />

*** ** * ** ***

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

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder#Builder()()` Returns an empty `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder` instance. |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder` | `@https://developer.android.com/reference/kotlin/androidx/car/app/annotations/RequiresCarApi(value = 6) https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder#addAction(androidx.car.app.model.Action)(action: https://developer.android.com/reference/kotlin/androidx/car/app/model/Action)` Adds an additional action to the end of the row. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder#addText(androidx.car.app.model.CarText)(text: https://developer.android.com/reference/kotlin/androidx/car/app/model/CarText)` Adds a text string to the row below the title, with support for multiple length variants. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder#addText(java.lang.CharSequence)(text: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html)` Adds a text string to the row below the title. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder#build()()` Constructs the `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row` defined by this builder. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder#setBrowsable(boolean)(isBrowsable: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Shows an icon at the end of the row that indicates that the row is browsable. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder` | `@https://developer.android.com/reference/kotlin/androidx/car/app/annotations/RequiresCarApi(value = 5) https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder#setEnabled(boolean)(enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Sets the initial enabled state for `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row`. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder` | `@https://developer.android.com/reference/kotlin/androidx/car/app/annotations/RequiresCarApi(value = 8) https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder#setEndImage(androidx.car.app.model.CarIcon)(image: https://developer.android.com/reference/kotlin/androidx/car/app/model/CarIcon)` Sets an image at the end of the row, with the default size `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#IMAGE_TYPE_SMALL()`. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder` | `@https://developer.android.com/reference/kotlin/androidx/car/app/annotations/RequiresCarApi(value = 8) https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder#setEndImage(androidx.car.app.model.CarIcon,int)(endImage: https://developer.android.com/reference/kotlin/androidx/car/app/model/CarIcon, rowEndImageType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets an image to show at the **end** of the row content, but **before** the **secondary actions** (if set via `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder#addAction(androidx.car.app.model.Action)`), and is distinct from the primary image set via `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder#setImage(androidx.car.app.model.CarIcon)`. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder#setImage(androidx.car.app.model.CarIcon)(image: https://developer.android.com/reference/kotlin/androidx/car/app/model/CarIcon)` Sets an image to show in the row with the default size `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#IMAGE_TYPE_SMALL()`. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder#setImage(androidx.car.app.model.CarIcon,int)(image: https://developer.android.com/reference/kotlin/androidx/car/app/model/CarIcon, imageType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets an image to show in the row with the given image type. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder` | `@https://developer.android.com/reference/kotlin/androidx/car/app/annotations/RequiresCarApi(value = 8) https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder#setIndexable(boolean)(indexable: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Sets whether this item can be included in indexed lists. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder#setMetadata(androidx.car.app.model.Metadata)(metadata: https://developer.android.com/reference/kotlin/androidx/car/app/model/Metadata)` Sets the `https://developer.android.com/reference/kotlin/androidx/car/app/model/Metadata` associated with the row. |
| `@https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder` | `@https://developer.android.com/reference/kotlin/androidx/car/app/annotations/RequiresCarApi(value = 6) https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder#setNumericDecoration(int)(decoration: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets a numeric decoration to display in the row. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder#setOnClickListener(androidx.car.app.model.OnClickListener)(onClickListener: https://developer.android.com/reference/kotlin/androidx/car/app/model/OnClickListener)` Sets the `https://developer.android.com/reference/kotlin/androidx/car/app/model/OnClickListener` to be called back when the row is clicked. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder` | `@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/Row.Builder#setProgressBar(androidx.car.app.model.CarProgressBar)(progressBar: https://developer.android.com/reference/kotlin/androidx/car/app/model/CarProgressBar)` Sets the progress bar to display in the row. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder#setTitle(androidx.car.app.model.CarText)(title: https://developer.android.com/reference/kotlin/androidx/car/app/model/CarText)` Sets the title of the row, with support for multiple length variants. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder#setTitle(java.lang.CharSequence)(title: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html)` Sets the title of the row. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder#setToggle(androidx.car.app.model.Toggle)(toggle: https://developer.android.com/reference/kotlin/androidx/car/app/model/Toggle)` Sets a `https://developer.android.com/reference/kotlin/androidx/car/app/model/Toggle` to show in the row. |

## Public constructors

### Builder

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

```
Builder()
```

Returns an empty `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder` instance.

## Public functions

### addAction

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

```
@RequiresCarApi(value = 6)
fun addAction(action: Action): Row.Builder
```

Adds an additional action to the end of the row. Note: From Car API 8 onwards, Rows are allowed to have 2 max actions to be set.

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/NullPointerException.html` | if `action` is `null` |
| `https://developer.android.com/reference/java/lang/IllegalArgumentException.html` | if `action` contains unsupported Action types, exceeds the maximum number of allowed actions or does not contain a valid `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarIcon`. |

### addText

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

```
fun addText(text: CarText): Row.Builder
```

Adds a text string to the row below the title, with support for multiple length variants.

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

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

### addText

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

```
fun addText(text: CharSequence): Row.Builder
```

Adds a text string to the row below the title.

The text can be customized with `https://developer.android.com/reference/kotlin/androidx/car/app/model/ForegroundCarColorSpan`, `https://developer.android.com/reference/kotlin/androidx/car/app/model/DistanceSpan`, and `https://developer.android.com/reference/kotlin/androidx/car/app/model/DurationSpan` instances, any other spans will be ignored by the host.

Most templates allow up to 2 text strings, but this may vary. This limit is documented in each individual template.

#### Text Wrapping

Each string added with this method will not wrap more than 1 line in the UI, with one exception: if the template allows a maximum number of text strings larger than 1, and the app adds a single text string, then this string will wrap up to the maximum.

For example, assuming 2 lines are allowed in the template where the row will be used, this code:

```kotlin
rowBuilder
    .addText("This is a rather long line of text")
    .addText("More text")
```

would wrap the text like this:

```kotlin
This is a rather long li...
More text
```
In contrast, this code:

```kotlin
rowBuilder
    .addText("This is a rather long line of text. More text")
```

would wrap the single line of text at a maximum of 2 lines, producing a different result:

```kotlin
This is a rather long line
of text. More text
```

Note that when using a single line, a line break character can be used to break it into two, but the results may be unpredictable depending on the width the text is wrapped at:

```kotlin
rowBuilder
    .addText("This is a rather long line of text\nMore text")
```

would produce a result that may loose the "More text" string:

```kotlin
This is a rather long line
of text
```

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

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/ForegroundCarColorSpan` |   |

### build

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

```
fun build(): Row
```

Constructs the `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row` defined by this builder.

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalStateException.html` | if the row's title is not set or if the row is not set correctly. See `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder#setToggle(androidx.car.app.model.Toggle)` and `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder#setBrowsable(boolean)`. |

### setBrowsable

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

```
fun setBrowsable(isBrowsable: Boolean): Row.Builder
```

Shows an icon at the end of the row that indicates that the row is browsable.

Browsable rows can be used, for example, to represent the parent row in a hierarchy of lists with child lists.

If a row is browsable, then no `https://developer.android.com/reference/kotlin/androidx/car/app/model/Action` or `https://developer.android.com/reference/kotlin/androidx/car/app/model/Toggle` can be added to it. A browsable row must have an OnClickListener set.

### setEnabled

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

```
@RequiresCarApi(value = 5)
fun setEnabled(enabled: Boolean): Row.Builder
```

Sets the initial enabled state for `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row`.

The default state of a `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row` is enabled.

### setEndImage

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

```
@RequiresCarApi(value = 8)
fun setEndImage(image: CarIcon): Row.Builder
```

Sets an image at the end of the row, with the default size `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#IMAGE_TYPE_SMALL()`.

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

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

### setEndImage

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

```
@RequiresCarApi(value = 8)
fun setEndImage(endImage: CarIcon, rowEndImageType: Int): Row.Builder
```

Sets an image to show at the **end** of the row content, but **before** the **secondary actions** (if set via `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder#addAction(androidx.car.app.model.Action)`), and is distinct from the primary image set via `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder#setImage(androidx.car.app.model.CarIcon)`.

The **end image will not be honored** if the row has any of the following elements:

- A `https://developer.android.com/reference/kotlin/androidx/car/app/model/Toggle` is set via `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder#setToggle(androidx.car.app.model.Toggle)`.
- The row is set to be browsable via `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder#setBrowsable(boolean)`.
- The row is part of a selectable itemlist

| Parameters |
|---|---|
| `endImage: https://developer.android.com/reference/kotlin/androidx/car/app/model/CarIcon` | The `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarIcon` to display at the end of the row, or `null` to not display one. |
| `rowEndImageType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | one of `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#IMAGE_TYPE_SMALL()`, `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#IMAGE_TYPE_ICON()`, `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#IMAGE_TYPE_LARGE()`, `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#IMAGE_TYPE_EXTRA_SMALL()`, `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#IMAGE_TYPE_MEDIUM()` |

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

### setImage

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

```
fun setImage(image: CarIcon): Row.Builder
```

Sets an image to show in the row with the default size `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#IMAGE_TYPE_SMALL()`.

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

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

### setImage

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

```
fun setImage(image: CarIcon, imageType: Int): Row.Builder
```

Sets an image to show in the row with the given image type.

For a custom `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarIcon`, its `https://developer.android.com/reference/kotlin/androidx/core/graphics/drawable/IconCompat` instance can be of `https://developer.android.com/reference/kotlin/androidx/core/graphics/drawable/IconCompat#TYPE_BITMAP()`, `https://developer.android.com/reference/kotlin/androidx/core/graphics/drawable/IconCompat#TYPE_RESOURCE()`, or `https://developer.android.com/reference/kotlin/androidx/core/graphics/drawable/IconCompat#TYPE_URI()`.

#### Image Sizing Guidance

If the input image's size exceeds the sizing requirements for the given image type in either one of the dimensions, it will be scaled down to be centered inside the bounding box while preserving its aspect ratio.

See `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarIcon` for more details related to providing icon and image resources that work with different car screen pixel densities.

| Parameters |
|---|---|
| `image: https://developer.android.com/reference/kotlin/androidx/car/app/model/CarIcon` | the `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarIcon` to display or `null` to not display one |
| `imageType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | one of `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#IMAGE_TYPE_ICON()`, `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#IMAGE_TYPE_SMALL()`, `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#IMAGE_TYPE_EXTRA_SMALL()`, `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#IMAGE_TYPE_MEDIUM()` or `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#IMAGE_TYPE_LARGE()` |

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

### setIndexable

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

```
@RequiresCarApi(value = 8)
fun setIndexable(indexable: Boolean): Row.Builder
```

Sets whether this item can be included in indexed lists. By default, this is set to `true`.

The host creates indexed lists to help users navigate through long lists more easily by sorting, filtering, or some other means.

For example, a media app may, by default, show a user's playlists sorted by date created. If the app provides these playlists via the `SectionedItemTemplate` and enables `#isAlphabeticalIndexingAllowed`, the user will be able to select a letter on a keyboard to jump to their playlists that start with that letter. When this happens, the list is reconstructed and sorted alphabetically, then shown to the user, jumping down to the letter. Items that are set to `#setIndexable(false)`, do not show up in this new sorted list. Sticking with the media example, a media app may choose to hide things like "autogenerated playlists" from the list and only keep user created playlists.

Individual items can be set to be included or excluded from filtered lists, but it's also possible to enable/disable the creation of filtered lists as a whole via the template's API (eg. `SectionedItemTemplate
.Builder#setAlphabeticalIndexingStrategy(int)`).

### setMetadata

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

```
fun setMetadata(metadata: Metadata): Row.Builder
```

Sets the `https://developer.android.com/reference/kotlin/androidx/car/app/model/Metadata` associated with the row.

| Parameters |
|---|---|
| `metadata: https://developer.android.com/reference/kotlin/androidx/car/app/model/Metadata` | The metadata to set with the row. Pass `https://developer.android.com/reference/kotlin/androidx/car/app/model/Metadata#EMPTY_METADATA()` to not associate any metadata with the row |

### setNumericDecoration

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

```
@RequiresCarApi(value = 6)
fun setNumericDecoration(decoration: Int): @IntRange(from = 0) Row.Builder
```

Sets a numeric decoration to display in the row.

Numeric decorations are displayed at the end of the row. A numeric decoration cannot be set with only a **single** action which will end up only showing the action; however, the decoration may be set with 2 actions. Numeric decorations are not displayed in half-list templates.

Numeric decorations typically represent a quantity of unseen content. For example, a decoration might represent a number of missed notifications, or a number of unread messages in a conversation.

| Parameters |
|---|---|
| `decoration: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the `int` to display. Must be positive, zero, or equal to `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#NO_DECORATION()`. |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException.html` | if `decoration` is invalid |

### setOnClickListener

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

```
fun setOnClickListener(onClickListener: OnClickListener): Row.Builder
```

Sets the `https://developer.android.com/reference/kotlin/androidx/car/app/model/OnClickListener` to be called back when the row is clicked.

Note that the listener relates to UI events and will be executed on the main thread using `https://developer.android.com/reference/android/os/Looper.html#getMainLooper()`.

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

### setProgressBar

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

```
@RequiresCarApi(value = 9)
@ExperimentalCarApi
fun setProgressBar(progressBar: CarProgressBar): Row.Builder
```

Sets the progress bar to display in the row.

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

### setTitle

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

```
fun setTitle(title: CarText): Row.Builder
```

Sets the title of the row, with support for multiple length variants.

Only `https://developer.android.com/reference/kotlin/androidx/car/app/model/DistanceSpan`s and `https://developer.android.com/reference/kotlin/androidx/car/app/model/DurationSpan`s are supported in the input string.

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/NullPointerException.html` | if `title` is `null` |
| `https://developer.android.com/reference/java/lang/IllegalArgumentException.html` | if `title` is empty, of if it contains unsupported spans |

### setTitle

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

```
fun setTitle(title: CharSequence): Row.Builder
```

Sets the title of the row.

Only `https://developer.android.com/reference/kotlin/androidx/car/app/model/DistanceSpan`s and `https://developer.android.com/reference/kotlin/androidx/car/app/model/DurationSpan`s are supported in the input string.

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/NullPointerException.html` | if `title` is `null` |
| `https://developer.android.com/reference/java/lang/IllegalArgumentException.html` | if `title` is empty, of if it contains unsupported spans |

### setToggle

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

```
fun setToggle(toggle: Toggle): Row.Builder
```

Sets a `https://developer.android.com/reference/kotlin/androidx/car/app/model/Toggle` to show in the row.

If a row has a toggle set, then no `https://developer.android.com/reference/kotlin/androidx/car/app/model/Action`, `https://developer.android.com/reference/kotlin/androidx/car/app/model/OnClickListener` or numeric decoration can be set.

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