# Row

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

*** ** * ** ***


```
@CarProtocol
class Row : Item
```

<br />

*** ** * ** ***

Represents a row with a title, several lines of text, an optional image, and an optional action or switch.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder` A builder of `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row`. |

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/car/app/annotations/RequiresCarApi(value = 8) https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#IMAGE_TYPE_EXTRA_SMALL() = 8` Represents an extra small image to be displayed in the row. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#IMAGE_TYPE_ICON() = 4` **This property is deprecated.** Use `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#IMAGE_TYPE_SMALL()` instead and set explicit tint via `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarIcon.Builder#setTint(androidx.car.app.model.CarColor)` if needed. <br /> |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#IMAGE_TYPE_LARGE() = 2` Represents a large image to be displayed in the row. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/car/app/annotations/RequiresCarApi(value = 8) https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#IMAGE_TYPE_MEDIUM() = 16` Represents a medium image to be displayed in the row. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#IMAGE_TYPE_SMALL() = 1` Represents a small image to be displayed in the row. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#NO_DECORATION() = -1` An integer value indicating no decoration should be shown. |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#equals(java.lang.Object)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `(https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/car/app/model/Action!>` | `@https://developer.android.com/reference/kotlin/androidx/car/app/annotations/RequiresCarApi(value = 6) https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#getActions()()` Returns the list of additional actions. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarIcon?` | `@https://developer.android.com/reference/kotlin/androidx/car/app/annotations/RequiresCarApi(value = 8) https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#getEndImage()()` Returns a fixed-sized image to display at the end of the row content, or `null` if not set. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarIcon?` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#getImage()()` Returns the image to display in the row or `null` if the row does not contain an image. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Metadata?` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#getMetadata()()` Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/Metadata` associated with the row or `null` if there is no metadata associated with the row. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/car/app/annotations/RequiresCarApi(value = 6) https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#getNumericDecoration()()` Returns the numeric decoration. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/OnClickDelegate?` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#getOnClickDelegate()()` Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/OnClickListener` to be called back when the row is clicked or ` null` if the row is non-clickable. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarProgressBar?` | `@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#getProgressBar()()` Returns the progress bar to display in the row, or `null` if not set. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/car/app/annotations/RequiresCarApi(value = 8) https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#getRowEndImageType()()` Returns the type of the end image in the row. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#getRowImageType()()` Returns the type of the image in the row. |
| `(https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/car/app/model/CarText!>` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#getTexts()()` Returns the list of text below the title. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarText?` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#getTitle()()` Returns the title of the row or `null` if not set. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Toggle?` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#getToggle()()` Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/Toggle` in the row or `null` if the row does not contain a toggle. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#hashCode()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#isBrowsable()()` Returns whether the row is browsable. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `@https://developer.android.com/reference/kotlin/androidx/car/app/annotations/RequiresCarApi(value = 5) https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#isEnabled()()` Returns `true` if the row is enabled. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `@https://developer.android.com/reference/kotlin/androidx/car/app/annotations/RequiresCarApi(value = 8) https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#isIndexable()()` Returns whether this item can be included in indexed lists. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#row()()` Returns a `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row` for rowing `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#yourBoat()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#toString()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#yourBoat()()` Rows your boat. |

## Constants

### IMAGE_TYPE_EXTRA_SMALL

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

```
@RequiresCarApi(value = 8)
const val IMAGE_TYPE_EXTRA_SMALL = 8: Int
```

Represents an extra small image to be displayed in the row.

To minimize scaling artifacts across a wide range of car screens, apps should provide images targeting a 48 x 48 dp bounding box. If necessary, the image will be scaled down while preserving its aspect ratio.

### IMAGE_TYPE_ICON

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

```
const val IMAGE_TYPE_ICON = 4: Int
```

> [!CAUTION]
> **This property is deprecated.**   
>
> Use `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#IMAGE_TYPE_SMALL()` instead and set explicit tint via `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarIcon.Builder#setTint(androidx.car.app.model.CarColor)` if needed.

Represents a small image to be displayed in the row.

To minimize scaling artifacts across a wide range of car screens, apps should provide images targeting a 88 x 88 dp bounding box. If necessary, the icon will be scaled down while preserving its aspect ratio.

A tint color is expected to be provided via `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarIconStyle.Builder#setTint(androidx.car.app.model.CarColor)` provided to the icon with `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarIcon.Builder#setStyle(androidx.car.app.model.CarIconStyle)`. Otherwise, a default tint color as determined by the host will be applied.

### IMAGE_TYPE_LARGE

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

```
const val IMAGE_TYPE_LARGE = 2: Int
```

Represents a large image to be displayed in the row.

To minimize scaling artifacts across a wide range of car screens, apps should provide images targeting a 224 x 224 dp bounding box. If necessary, the image will be scaled down while preserving its aspect ratio.

### IMAGE_TYPE_MEDIUM

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

```
@RequiresCarApi(value = 8)
const val IMAGE_TYPE_MEDIUM = 16: Int
```

Represents a medium image to be displayed in the row.

To minimize scaling artifacts across a wide range of car screens, apps should provide images targeting a 128 x 128 dp bounding box. If necessary, the image will be scaled down while preserving its aspect ratio.

### IMAGE_TYPE_SMALL

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

```
const val IMAGE_TYPE_SMALL = 1: Int
```

Represents a small image to be displayed in the row.

To minimize scaling artifacts across a wide range of car screens, apps should provide images targeting a 88 x 88 dp bounding box. If necessary, the image will be scaled down while preserving its aspect ratio.

### NO_DECORATION

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

```
const val NO_DECORATION = -1: Int
```

An integer value indicating no decoration should be shown.

## Public functions

### equals

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

### getActions

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

```
@RequiresCarApi(value = 6)
fun getActions(): (Mutable)List<Action!>
```

Returns the list of additional actions.

Actions are displayed at the end of the row.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder#addAction(androidx.car.app.model.Action)` |   |

### getEndImage

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

```
@RequiresCarApi(value = 8)
fun getEndImage(): CarIcon?
```

Returns a fixed-sized image to display at the end of the row content, or `null` if not set.

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

### getImage

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

```
fun getImage(): CarIcon?
```

Returns the image to display in the row or `null` if the row does not contain an image.

| See also |
|---|---|
| `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#setImage(androidx.car.app.model.CarIcon,int)` |   |

### getMetadata

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

```
fun getMetadata(): Metadata?
```

Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/Metadata` associated with the row or `null` if there is no metadata associated with the row.

### getNumericDecoration

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

```
@RequiresCarApi(value = 6)
fun getNumericDecoration(): Int
```

Returns the numeric decoration.

Numeric decorations are displayed at the end of the row, but before any actions.

Numeric decorations are only allowed in full-width lists.

`https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#NO_DECORATION()` will be returned if the row does not contain a decoration.

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

### getOnClickDelegate

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

```
fun getOnClickDelegate(): OnClickDelegate?
```

Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/OnClickListener` to be called back when the row is clicked or `
null` if the row is non-clickable.

### getProgressBar

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

```
@RequiresCarApi(value = 9)
@ExperimentalCarApi
fun getProgressBar(): CarProgressBar?
```

Returns the progress bar to display in the row, or `null` if not set.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder#setProgressBar(androidx.car.app.model.CarProgressBar)` |   |

### getRowEndImageType

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

```
@RequiresCarApi(value = 8)
fun getRowEndImageType(): Int
```

Returns the type of the end image in the row.

### getRowImageType

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

```
fun getRowImageType(): Int
```

Returns the type of the image in the row.

### getTexts

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

```
fun getTexts(): (Mutable)List<CarText!>
```

Returns the list of text below the title.

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

### getTitle

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

```
fun getTitle(): CarText?
```

Returns the title of the row or `null` if not set.

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

### getToggle

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

```
fun getToggle(): Toggle?
```

Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/Toggle` in the row or `null` if the row does not contain a toggle.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder#setToggle(androidx.car.app.model.Toggle)` |   |

### hashCode

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

### isBrowsable

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

```
fun isBrowsable(): Boolean
```

Returns whether the row is browsable.

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.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#isBrowsable()` |   |

### isEnabled

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

```
@RequiresCarApi(value = 5)
fun isEnabled(): Boolean
```

Returns `true` if the row is enabled.

### isIndexable

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

```
@RequiresCarApi(value = 8)
fun isIndexable(): Boolean
```

Returns whether this item can be included in indexed lists.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row.Builder#setIndexable(boolean)` |   |

### row

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

```
fun row(): Row
```

Returns a `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row` for rowing `https://developer.android.com/reference/kotlin/androidx/car/app/model/Row#yourBoat()`

### toString

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

### yourBoat

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

```
fun yourBoat(): CharSequence
```

Rows your boat.

Example usage:

```kotlin
row.row().row().yourBoat(); // gently down the stream
```