# CondensedItem

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

*** ** * ** ***


```
@RequiresCarApi(value = 9)
@ExperimentalCarApi
@CarProtocol
class CondensedItem : Item
```

<br />

*** ** * ** ***

A main UI component representing an item in a condensed format.

## Summary

| ### Nested types |
|---|
| `@https://developer.android.com/reference/kotlin/androidx/car/app/annotations/RequiresCarApi(value = 9) @https://developer.android.com/reference/kotlin/androidx/car/app/annotations/ExperimentalCarApi class https://developer.android.com/reference/kotlin/androidx/car/app/model/CondensedItem.Builder` A builder for `https://developer.android.com/reference/kotlin/androidx/car/app/model/CondensedItem`. |

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/CondensedItem#IMAGE_TYPE_LARGE() = 3` Represents a large image. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/CondensedItem#IMAGE_TYPE_MEDIUM() = 2` Represents a medium padded 1:1 square image to be displayed in the condensed item. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/CondensedItem#IMAGE_TYPE_SMALL() = 1` Represents a small icon-sized image to be displayed in the condensed item. |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/CondensedItem#equals(java.lang.Object)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarIcon?` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/CondensedItem#getLeadingImage()()` Returns the leading image of the item, 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/model/CondensedItem#getLeadingImageType()()` Returns the type of the leading image. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/OnClickDelegate?` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/CondensedItem#getOnClickDelegate()()` Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/OnClickDelegate` for the item, or `null` if not set. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarProgressBar?` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/CondensedItem#getProgressBar()()` Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarProgressBar` for the item, or `null` if not set. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/CondensedItemStyle?` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/CondensedItem#getStyle()()` Returns the style of the item, or `null` if not set. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarText?` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/CondensedItem#getText()()` Returns the text of the item, or `null` if not set. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarText?` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/CondensedItem#getTitle()()` Returns the title of the item, 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/CondensedItem#getTrailingImage()()` Returns the trailing image of the item, 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/model/CondensedItem#getTrailingImageType()()` Returns the type of the trailing image. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/CondensedItem#hashCode()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/CondensedItem#isIndexable()()` Returns whether the item can be included in indexed lists. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/CondensedItem#toString()()` |

## Constants

### IMAGE_TYPE_LARGE

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

```
const val IMAGE_TYPE_LARGE = 3: Int
```

Represents a large image. The host renders it edge-to-edge, scaling the image to fill and potentially crop within the bounds.

### IMAGE_TYPE_MEDIUM

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

```
const val IMAGE_TYPE_MEDIUM = 2: Int
```

Represents a medium padded 1:1 square image to be displayed in the condensed item.

The host renders it with standard padding and scales the image to fit within the bounds.

### IMAGE_TYPE_SMALL

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

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

Represents a small icon-sized image to be displayed in the condensed item.

## Public functions

### equals

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

### getLeadingImage

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

```
fun getLeadingImage(): CarIcon?
```

Returns the leading image of the item, or `null` if not set.

### getLeadingImageType

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

```
fun getLeadingImageType(): Int
```

Returns the type of the leading image.

### getOnClickDelegate

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

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

Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/OnClickDelegate` for the item, or `null` if not set.

### getProgressBar

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

```
fun getProgressBar(): CarProgressBar?
```

Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarProgressBar` for the item, or `null` if not set.

### getStyle

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

```
fun getStyle(): CondensedItemStyle?
```

Returns the style of the item, or `null` if not set.

### getText

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

```
fun getText(): CarText?
```

Returns the text of the item, or `null` if not set.

### getTitle

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

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

Returns the title of the item, or `null` if not set.

### getTrailingImage

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

```
fun getTrailingImage(): CarIcon?
```

Returns the trailing image of the item, or `null` if not set.

### getTrailingImageType

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

```
fun getTrailingImageType(): Int
```

Returns the type of the trailing image.

### hashCode

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

### isIndexable

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

```
fun isIndexable(): Boolean
```

Returns whether the item can be included in indexed lists.

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

### toString

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