# 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)
class RowSection : Section<Row!>
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.car.app.model.Section](https://developer.android.com/reference/kotlin/androidx/car/app/model/Section)\<[Row](https://developer.android.com/reference/kotlin/androidx/car/app/model/Row)!\> ||
|   | ↳ | [androidx.car.app.model.RowSection](https://developer.android.com/reference/kotlin/androidx/car/app/model/RowSection) |

*** ** * ** ***

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

## Summary

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

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/RowSection#equals(java.lang.Object)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/RowSection#getInitialSelectedIndex()()` When set to a value that correlates to an index in `https://developer.android.com/reference/kotlin/androidx/car/app/model/Section#getItemsDelegate()`, this entire row section should be treated as a selection group (eg. radio group). |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/RowSection#hashCode()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/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://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/RowSection#toString()()` |

### Inherited functions

From [androidx.car.app.model.Section](https://developer.android.com/reference/kotlin/androidx/car/app/model/Section) `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarText?` `https://developer.android.com/reference/kotlin/androidx/car/app/model/Section#getNoItemsMessage()()`

Returns the optional message that should appear if there are no items added to this section.
`https://developer.android.com/reference/kotlin/androidx/car/app/model/OnItemVisibilityChangedDelegate?` `https://developer.android.com/reference/kotlin/androidx/car/app/model/Section#getOnItemVisibilityChangedDelegate()()`

Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/OnItemVisibilityChangedDelegate` to be called when the visible items in this `https://developer.android.com/reference/kotlin/androidx/car/app/model/Section` changes, or `null` if one isn't set.
`https://developer.android.com/reference/kotlin/androidx/car/app/model/SectionHeader?` `@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/Section#getSectionHeader()()`

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

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

## Public functions

### equals

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

### getInitialSelectedIndex

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

```
fun getInitialSelectedIndex(): Int
```

When set to a value that correlates to an index in `https://developer.android.com/reference/kotlin/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

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

### isSelectionGroup

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

```
fun isSelectionGroup(): Boolean
```

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

### toString

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