# RowSection

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

*** ** * ** ***


```
@CarProtocol
@RequiresCarApi(value = 8)
public final class RowSection extends Section<Row>
```

<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)\<[Row](https://developer.android.com/reference/androidx/car/app/model/Row)\> ||
|   | ↳ | [androidx.car.app.model.RowSection](https://developer.android.com/reference/androidx/car/app/model/RowSection) |

*** ** * ** ***

A section within the `SectionedItemTemplate` that contains `https://developer.android.com/reference/androidx/car/app/model/Row`s - good for showcasing small icons and longer text for every entry.

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/car/app/model/RowSection.Builder extends https://developer.android.com/reference/androidx/car/app/model/Section.BaseBuilder<https://developer.android.com/reference/androidx/car/app/model/Row, https://developer.android.com/reference/androidx/car/app/model/RowSection.Builder>` A builder that constructs `https://developer.android.com/reference/androidx/car/app/model/RowSection` instances. |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/car/app/model/RowSection#equals(java.lang.Object)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/Object.html other)` |
| `int` | `https://developer.android.com/reference/androidx/car/app/model/RowSection#getInitialSelectedIndex()()` When set to a value that correlates to an index in `https://developer.android.com/reference/androidx/car/app/model/Section#getItemsDelegate()`, this entire row section should be treated as a selection group (eg. radio group). |
| `int` | `https://developer.android.com/reference/androidx/car/app/model/RowSection#hashCode()()` |
| `boolean` | `https://developer.android.com/reference/androidx/car/app/model/RowSection#isSelectionGroup()()` Flag denoting whether or not this section of rows should be treated as a selection group (ie. radio button group). |
| `@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/RowSection#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.

## Public methods

### equals

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

### getInitialSelectedIndex

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

```
public int getInitialSelectedIndex()
```

When set to a value that correlates to an index in `https://developer.android.com/reference/androidx/car/app/model/Section#getItemsDelegate()`, this entire row section should be treated as a selection group (eg. radio group). Otherwise this will be a negative value to denote that this row section should not be transformed into a selection group.

### hashCode

```
public int hashCode()
```

### isSelectionGroup

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

```
public boolean isSelectionGroup()
```

Flag denoting whether or not this section of rows should be treated as a selection group (ie. radio button group).

### toString

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