# AccessibilityNodeInfo.CollectionItemInfo

Added in[API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# CollectionItemInfo

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo "View this page in Java")  

```
class CollectionItemInfo
```

|---|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                                                             ||
| ↳ | [android.view.accessibility.AccessibilityNodeInfo.CollectionItemInfo](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#) |

Class with information if a node is a collection item.

A collection item is contained in a collection, it starts at a given row and column in the collection, and spans one or more rows and columns. For example, a header of two related table columns starts at the first row and the first column, spans one row and two columns.

## Summary

|                                                                                                                                                 Nested classes                                                                                                                                                 ||
|---|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|   | [Builder](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo.Builder) Builder for creating[CollectionItemInfo](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#)objects. |

|                                                                                                                                                                                       Constants                                                                                                                                                                                        ||
|----------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [SORT_DIRECTION_ASCENDING](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#SORT_DIRECTION_ASCENDING:kotlin.Int) Items are sorted in ascending order (e.g., A-Z, 0-9).                                                             |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [SORT_DIRECTION_DESCENDING](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#SORT_DIRECTION_DESCENDING:kotlin.Int) Items are sorted in descending order (e.g., Z-A, 9-0).                                                          |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [SORT_DIRECTION_NONE](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#SORT_DIRECTION_NONE:kotlin.Int) There is no sort direction.                                                                                                 |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [SORT_DIRECTION_OTHER](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#SORT_DIRECTION_OTHER:kotlin.Int) Items are sorted, but using a method other than ascending or descending (e.g., based on relevance or a custom algorithm). |

|                                                                                                                                                                                                                                                                                                                                                                                                                        Public constructors                                                                                                                                                                                                                                                                                                                                                                                                                        ||
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [CollectionItemInfo](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#CollectionItemInfo(kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Boolean))`(`rowIndex:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `rowSpan:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `columnIndex:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `columnSpan:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `heading:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` Creates a new instance.                                                                                                                     |
| [CollectionItemInfo](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#CollectionItemInfo(kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Boolean,%20kotlin.Boolean))`(`rowIndex:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `rowSpan:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `columnIndex:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `columnSpan:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `heading:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`, `selected:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` Creates a new instance. |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Public methods                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         ||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                                                                             | [getColumnIndex](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#getColumnIndex())`()` Gets the column index at which the item is located.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                                                                             | [getColumnSpan](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#getColumnSpan())`()` Gets the number of columns the item spans.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?                                                                                      | [getColumnTitle](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#getColumnTitle())`()` Gets the column title at which the item is located.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                                                                             | [getRowIndex](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#getRowIndex())`()` Gets the row index at which the item is located.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                                                                             | [getRowSpan](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#getRowSpan())`()` Gets the number of rows the item spans.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?                                                                                      | [getRowTitle](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#getRowTitle())`()` Gets the row title at which the item is located.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                                                                             | [getSortDirection](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#getSortDirection())`()` Gets the sort direction applied to the data associated with this node.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                                                                                     | [isHeading](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#isHeading())`()` Gets if the collection item is a heading.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                                                                                     | [isSelected](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#isSelected())`()` Gets if the collection item is selected.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| static[AccessibilityNodeInfo.CollectionItemInfo](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#)! | [obtain](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#obtain(kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Boolean))`(`rowIndex:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `rowSpan:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `columnIndex:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `columnSpan:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `heading:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` Instantiates a new CollectionItemInfo.                                                                                                                     |
| static[AccessibilityNodeInfo.CollectionItemInfo](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#)! | [obtain](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#obtain(kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Boolean,%20kotlin.Boolean))`(`rowIndex:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `rowSpan:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `columnIndex:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `columnSpan:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `heading:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`, `selected:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` Instantiates a new CollectionItemInfo. |

## Constants

### SORT_DIRECTION_ASCENDING

Added in[API level 36.1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val SORT_DIRECTION_ASCENDING: Int
```

Items are sorted in ascending order (e.g., A-Z, 0-9).  

    Value: 1

**See Also**

- <https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#getSortDirection()>
- [android.view.accessibility.AccessibilityNodeInfo.CollectionItemInfo.Builder#setSortDirection(int)](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo.Builder#setSortDirection(kotlin.Int))  

### SORT_DIRECTION_DESCENDING

Added in[API level 36.1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val SORT_DIRECTION_DESCENDING: Int
```

Items are sorted in descending order (e.g., Z-A, 9-0).  

    Value: 2

**See Also**

- <https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#getSortDirection()>
- [android.view.accessibility.AccessibilityNodeInfo.CollectionItemInfo.Builder#setSortDirection(int)](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo.Builder#setSortDirection(kotlin.Int))  

### SORT_DIRECTION_NONE

Added in[API level 36.1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val SORT_DIRECTION_NONE: Int
```

There is no sort direction.  

    Value: 0

**See Also**

- <https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#getSortDirection()>
- [android.view.accessibility.AccessibilityNodeInfo.CollectionItemInfo.Builder#setSortDirection(int)](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo.Builder#setSortDirection(kotlin.Int))  

### SORT_DIRECTION_OTHER

Added in[API level 36.1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val SORT_DIRECTION_OTHER: Int
```

Items are sorted, but using a method other than ascending or descending (e.g., based on relevance or a custom algorithm).  

    Value: 3

**See Also**

- <https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#getSortDirection()>
- [android.view.accessibility.AccessibilityNodeInfo.CollectionItemInfo.Builder#setSortDirection(int)](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo.Builder#setSortDirection(kotlin.Int))

## Public constructors

### CollectionItemInfo

Added in[API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
CollectionItemInfo(
    rowIndex: Int, 
    rowSpan: Int, 
    columnIndex: Int, 
    columnSpan: Int, 
    heading: Boolean)
```

Creates a new instance.

|                                                                Parameters                                                                ||
|---------------|---------------------------------------------------------------------------------------------------------------------------|
| `rowIndex`    | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):The row index at which the item is located.    |
| `rowSpan`     | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):The number of rows the item spans.             |
| `columnIndex` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):The column index at which the item is located. |
| `columnSpan`  | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):The number of columns the item spans.          |
| `heading`     | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html):Whether the item is a heading.         |

### CollectionItemInfo

Added in[API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
CollectionItemInfo(
    rowIndex: Int, 
    rowSpan: Int, 
    columnIndex: Int, 
    columnSpan: Int, 
    heading: Boolean, 
    selected: Boolean)
```

Creates a new instance.

|                                                                Parameters                                                                ||
|---------------|---------------------------------------------------------------------------------------------------------------------------|
| `rowIndex`    | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):The row index at which the item is located.    |
| `rowSpan`     | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):The number of rows the item spans.             |
| `columnIndex` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):The column index at which the item is located. |
| `columnSpan`  | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):The number of columns the item spans.          |
| `heading`     | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html):Whether the item is a heading.         |
| `selected`    | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html):Whether the item is selected.          |

## Public methods

### getColumnIndex

Added in[API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun getColumnIndex(): Int
```

Gets the column index at which the item is located.

|                                            Return                                             ||
|----------------------------------------------------------------------------|-------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | The column index. |

### getColumnSpan

Added in[API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun getColumnSpan(): Int
```

Gets the number of columns the item spans.

|                                            Return                                            ||
|----------------------------------------------------------------------------|------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | The column span. |

### getColumnTitle

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun getColumnTitle(): String?
```

Gets the column title at which the item is located.

|                                                            Return                                                             ||
|-----------------------------------------------------------------------------------|--------------------------------------------|
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? | The column title. This value may be`null`. |

### getRowIndex

Added in[API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun getRowIndex(): Int
```

Gets the row index at which the item is located.

|                                           Return                                           ||
|----------------------------------------------------------------------------|----------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | The row index. |

### getRowSpan

Added in[API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun getRowSpan(): Int
```

Gets the number of rows the item spans.

|                                          Return                                           ||
|----------------------------------------------------------------------------|---------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | The row span. |

### getRowTitle

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun getRowTitle(): String?
```

Gets the row title at which the item is located.

|                                                           Return                                                           ||
|-----------------------------------------------------------------------------------|-----------------------------------------|
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? | The row title. This value may be`null`. |

### getSortDirection

Added in[API level 36.1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun getSortDirection(): Int
```

Gets the sort direction applied to the data associated with this node.

This item can only be set on a heading node within a table collection. Given the heading node's collection item, a subsequent collection item uses this sort direction if it has the same row or column index, and a greater index in the other dimension. For example, an item at row 2, column 2 can reference a heading at row 2, column 1 for its sort direction.

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   Return                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ||
|----------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | The current sort direction, one of: - [SORT_DIRECTION_NONE](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#SORT_DIRECTION_NONE:kotlin.Int) - [SORT_DIRECTION_ASCENDING](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#SORT_DIRECTION_ASCENDING:kotlin.Int) - [SORT_DIRECTION_DESCENDING](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#SORT_DIRECTION_DESCENDING:kotlin.Int) - [SORT_DIRECTION_OTHER](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#SORT_DIRECTION_OTHER:kotlin.Int) Value is[android.view.accessibility.AccessibilityNodeInfo.CollectionItemInfo#SORT_DIRECTION_NONE](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#SORT_DIRECTION_NONE:kotlin.Int),[android.view.accessibility.AccessibilityNodeInfo.CollectionItemInfo#SORT_DIRECTION_ASCENDING](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#SORT_DIRECTION_ASCENDING:kotlin.Int),[android.view.accessibility.AccessibilityNodeInfo.CollectionItemInfo#SORT_DIRECTION_DESCENDING](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#SORT_DIRECTION_DESCENDING:kotlin.Int), or[android.view.accessibility.AccessibilityNodeInfo.CollectionItemInfo#SORT_DIRECTION_OTHER](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#SORT_DIRECTION_OTHER:kotlin.Int) |

### isHeading

Added in[API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Deprecated in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun isHeading(): Boolean
```

**Deprecated:** *Use[AccessibilityNodeInfo.isHeading()](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo#isHeading())*

Gets if the collection item is a heading. For example, section heading, table header, etc.

|                                                    Return                                                     ||
|------------------------------------------------------------------------------------|---------------------------|
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | If the item is a heading. |

### isSelected

Added in[API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun isSelected(): Boolean
```

Gets if the collection item is selected.

|                                                    Return                                                    ||
|------------------------------------------------------------------------------------|--------------------------|
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | If the item is selected. |

### obtain

Added in[API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Deprecated in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static fun obtain(
    rowIndex: Int, 
    rowSpan: Int, 
    columnIndex: Int, 
    columnSpan: Int, 
    heading: Boolean
): AccessibilityNodeInfo.CollectionItemInfo!
```

**Deprecated:** *Object pooling has been discontinued. Create a new instance using the constructor[android.view.accessibility.AccessibilityNodeInfo.CollectionItemInfo#CollectionItemInfo(int,int,int,int,boolean)](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#CollectionItemInfo(kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Boolean))instead.*

Instantiates a new CollectionItemInfo.

|                                                                                                                                                    Parameters                                                                                                                                                     ||
|---------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `rowIndex`    | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):The row index at which the item is located.                                                                                                                                                                             |
| `rowSpan`     | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):The number of rows the item spans.                                                                                                                                                                                      |
| `columnIndex` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):The column index at which the item is located.                                                                                                                                                                          |
| `columnSpan`  | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):The number of columns the item spans.                                                                                                                                                                                   |
| `heading`     | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html):Whether the item is a heading. (Prefer[AccessibilityNodeInfo.setHeading(boolean)](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo#setHeading(kotlin.Boolean))). |

### obtain

Added in[API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Deprecated in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static fun obtain(
    rowIndex: Int, 
    rowSpan: Int, 
    columnIndex: Int, 
    columnSpan: Int, 
    heading: Boolean, 
    selected: Boolean
): AccessibilityNodeInfo.CollectionItemInfo!
```

**Deprecated:** *Object pooling has been discontinued. Create a new instance using the constructor[android.view.accessibility.AccessibilityNodeInfo.CollectionItemInfo#CollectionItemInfo(int,int,int,int,boolean)](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#CollectionItemInfo(kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Boolean))instead.*

Instantiates a new CollectionItemInfo.

|                                                                                                                                                    Parameters                                                                                                                                                     ||
|---------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `rowIndex`    | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):The row index at which the item is located.                                                                                                                                                                             |
| `rowSpan`     | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):The number of rows the item spans.                                                                                                                                                                                      |
| `columnIndex` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):The column index at which the item is located.                                                                                                                                                                          |
| `columnSpan`  | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):The number of columns the item spans.                                                                                                                                                                                   |
| `heading`     | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html):Whether the item is a heading. (Prefer[AccessibilityNodeInfo.setHeading(boolean)](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityNodeInfo#setHeading(kotlin.Boolean))). |
| `selected`    | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html):Whether the item is selected.                                                                                                                                                                                   |