# SpotlightSection

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

*** ** * ** ***


```
@CarProtocol
@RequiresCarApi(value = 9)
@ExperimentalCarApi
public final class SpotlightSection extends Section<CondensedItem>
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.car.app.model.Section](https://developer.android.com/reference/androidx/car/app/model/Section)\<[CondensedItem](https://developer.android.com/reference/androidx/car/app/model/CondensedItem)\> ||
|   | ↳ | [androidx.car.app.model.SpotlightSection](https://developer.android.com/reference/androidx/car/app/model/SpotlightSection) |

*** ** * ** ***

A section within the `https://developer.android.com/reference/androidx/car/app/model/SectionedItemTemplate` that contains a single image and multiple `https://developer.android.com/reference/androidx/car/app/model/CondensedItem`s. The items are rendered next to the image. Depending on the screen size, only some of the leading items may be placed.

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/car/app/model/SpotlightSection.Builder extends https://developer.android.com/reference/androidx/car/app/model/Section.BaseBuilder<https://developer.android.com/reference/androidx/car/app/model/CondensedItem, https://developer.android.com/reference/androidx/car/app/model/SpotlightSection.Builder>` A builder of `https://developer.android.com/reference/androidx/car/app/model/SpotlightSection`. |

| ### Constants |
|---|---|
| `static final int` | `https://developer.android.com/reference/androidx/car/app/model/SpotlightSection#INCOMPLETE_LAST_COLUMN_AS_IS() = 0` The last row will be shown as-is. |
| `static final int` | `https://developer.android.com/reference/androidx/car/app/model/SpotlightSection#INCOMPLETE_LAST_COLUMN_TRUNCATE() = 1` Truncates the last column if that column is not completely filled |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/car/app/model/SpotlightSection#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/NonNull.html https://developer.android.com/reference/androidx/car/app/model/CarIcon` | `https://developer.android.com/reference/androidx/car/app/model/SpotlightSection#getImage()()` Returns the image associated with the section. |
| `int` | `@https://developer.android.com/reference/androidx/car/app/annotations/RequiresCarApi(value = 9) @https://developer.android.com/reference/androidx/car/app/annotations/ExperimentalCarApi https://developer.android.com/reference/androidx/car/app/model/SpotlightSection#getIncompleteLastColumnStrategy()()` Returns the strategy for handling incomplete last column |
| `int` | `https://developer.android.com/reference/androidx/car/app/model/SpotlightSection#hashCode()()` |
| `@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/SpotlightSection#toString()()` |

### Inherited methods

From [androidx.car.app.model.Section](https://developer.android.com/reference/androidx/car/app/model/Section) `@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/Section#getNoItemsMessage()()`

Returns the optional message that should appear if there are no items added to this section.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/car/app/model/OnItemVisibilityChangedDelegate` `https://developer.android.com/reference/androidx/car/app/model/Section#getOnItemVisibilityChangedDelegate()()`

Returns the `https://developer.android.com/reference/androidx/car/app/model/OnItemVisibilityChangedDelegate` to be called when the visible items in this `https://developer.android.com/reference/androidx/car/app/model/Section` changes, or `null` if one isn't set.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/car/app/model/SectionHeader` `@https://developer.android.com/reference/androidx/car/app/annotations/RequiresCarApi(value = 9)
@https://developer.android.com/reference/androidx/car/app/annotations/ExperimentalCarApi
https://developer.android.com/reference/androidx/car/app/model/Section#getSectionHeader()()`

Returns the `https://developer.android.com/reference/androidx/car/app/model/SectionHeader` for this section, 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/Section#getTitle()()`

Returns the optional text that should appear with the items in this section.

## Constants

### INCOMPLETE_LAST_COLUMN_AS_IS

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

```
public static final int INCOMPLETE_LAST_COLUMN_AS_IS = 0
```

The last row will be shown as-is. This is a default behavior

### INCOMPLETE_LAST_COLUMN_TRUNCATE

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

```
public static final int INCOMPLETE_LAST_COLUMN_TRUNCATE = 1
```

Truncates the last column if that column is not completely filled

## Public methods

### equals

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

### getImage

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

```
public @NonNull CarIcon getImage()
```

Returns the image associated with the section.

### getIncompleteLastColumnStrategy

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

```
@RequiresCarApi(value = 9)
@ExperimentalCarApi
public int getIncompleteLastColumnStrategy()
```

Returns the strategy for handling incomplete last column

### hashCode

```
public int hashCode()
```

### toString

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