# 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
public final class CondensedItem implements Item
```

<br />

*** ** * ** ***

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

## Summary

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

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

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

```
public static final int IMAGE_TYPE_LARGE = 3
```

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)

```
public static final int IMAGE_TYPE_MEDIUM = 2
```

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)

```
public static final int IMAGE_TYPE_SMALL = 1
```

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

## Public methods

### equals

```
public boolean equals(@Nullable Object other)
```

### getLeadingImage

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

```
public @Nullable CarIcon getLeadingImage()
```

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)

```
public int getLeadingImageType()
```

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)

```
public @Nullable OnClickDelegate getOnClickDelegate()
```

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

```
public @Nullable CarProgressBar getProgressBar()
```

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

```
public @Nullable CondensedItemStyle getStyle()
```

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)

```
public @Nullable CarText getText()
```

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)

```
public @Nullable CarText getTitle()
```

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)

```
public @Nullable CarIcon getTrailingImage()
```

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)

```
public int getTrailingImageType()
```

Returns the type of the trailing image.

### hashCode

```
public int hashCode()
```

### isIndexable

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

```
public boolean isIndexable()
```

Returns whether the item can be included in indexed lists.

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

### toString

```
public @NonNull String toString()
```