# AccessibilityNodeInfoCompat.CollectionInfoCompat

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1  
Summary:[Constants](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat#constants)\|[Methods](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat#)  

# AccessibilityNodeInfoCompat.CollectionInfoCompat

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public
static


class
AccessibilityNodeInfoCompat.CollectionInfoCompat
`  
`

extends Object


``


`

|---|----------------------------------------------------------------------------------------|
| java.lang.Object                                                                          ||
| ↳ | android.support.v4.view.accessibility.AccessibilityNodeInfoCompat.CollectionInfoCompat |

<br />

*** ** * ** ***

Class with information if a node is a collection.

A collection of items has rows and columns and may be hierarchical. For example, a horizontal list is a collection with one column, as many rows as the list items, and is not hierarchical; A table is a collection with several rows, several columns, and is not hierarchical; A vertical tree is a hierarchical collection with one column and as many rows as the first level children.

<br />

## Summary

|                                                                                                                 ### Constants                                                                                                                 ||
|-------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | [SELECTION_MODE_MULTIPLE](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat#SELECTION_MODE_MULTIPLE) Selection mode where multiple items may be selected. |
| `int` | [SELECTION_MODE_NONE](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat#SELECTION_MODE_NONE) Selection mode where items are not selectable.               |
| `int` | [SELECTION_MODE_SINGLE](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat#SELECTION_MODE_SINGLE) Selection mode where a single item may be selected.      |

|                                                                                                                                                                                                                                                   ### Public methods                                                                                                                                                                                                                                                    ||
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` int`                                                                                                                                                                                       | ` `[getColumnCount](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat#getColumnCount())`() ` Gets the number of columns.                                                                                                                     |
| ` int`                                                                                                                                                                                       | ` `[getRowCount](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat#getRowCount())`() ` Gets the number of rows.                                                                                                                              |
| ` int`                                                                                                                                                                                       | ` `[getSelectionMode](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat#getSelectionMode())`() ` Gets the collection's selection mode.                                                                                                       |
| ` boolean`                                                                                                                                                                                   | ` `[isHierarchical](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat#isHierarchical())`() ` Gets if the collection is a hierarchically ordered.                                                                                             |
| ` static `[AccessibilityNodeInfoCompat.CollectionInfoCompat](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat) | ` `[obtain](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat#obtain(int, int, boolean, int))`(int rowCount, int columnCount, boolean hierarchical, int selectionMode) ` Returns a cached instance if such is available otherwise a new one. |
| ` static `[AccessibilityNodeInfoCompat.CollectionInfoCompat](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat) | ` `[obtain](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat#obtain(int, int, boolean))`(int rowCount, int columnCount, boolean hierarchical) ` Returns a cached instance if such is available otherwise a new one.                         |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat#)From class` java.lang.Object ` |-------------------|-------------------------------| | ` Object`         | ` clone() `                   | | ` boolean`        | ` equals(Object arg0) `       | | ` void`           | ` finalize() `                | | ` final Class<?>` | ` getClass() `                | | ` int`            | ` hashCode() `                | | ` final void`     | ` notify() `                  | | ` final void`     | ` notifyAll() `               | | ` String`         | ` toString() `                | | ` final void`     | ` wait(long arg0, int arg1) ` | | ` final void`     | ` wait(long arg0) `           | | ` final void`     | ` wait() `                    | ||

## Constants

### SELECTION_MODE_MULTIPLE

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int SELECTION_MODE_MULTIPLE
```

Selection mode where multiple items may be selected.

<br />

Constant Value: 2 (0x00000002)  

### SELECTION_MODE_NONE

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int SELECTION_MODE_NONE
```

Selection mode where items are not selectable.

<br />

Constant Value: 0 (0x00000000)  

### SELECTION_MODE_SINGLE

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int SELECTION_MODE_SINGLE
```

Selection mode where a single item may be selected.

<br />

Constant Value: 1 (0x00000001)

## Public methods

### getColumnCount

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getColumnCount ()
```

Gets the number of columns.

<br />

|             Returns             ||
|-------|--------------------------|
| `int` | The column count. <br /> |

### getRowCount

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getRowCount ()
```

Gets the number of rows.

<br />

|           Returns            ||
|-------|-----------------------|
| `int` | The row count. <br /> |

### getSelectionMode

added in[version 25.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getSelectionMode ()
```

Gets the collection's selection mode.

<br />

|                                                                                                                                                                                                                                                                                                Returns                                                                                                                                                                                                                                                                                                 ||
|-------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | The collection's selection mode, one of: - [SELECTION_MODE_NONE](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat#SELECTION_MODE_NONE) - [SELECTION_MODE_SINGLE](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat#SELECTION_MODE_SINGLE) - [SELECTION_MODE_MULTIPLE](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat#SELECTION_MODE_MULTIPLE) <br /> |

### isHierarchical

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean isHierarchical ()
```

Gets if the collection is a hierarchically ordered.

<br />

|                          Returns                          ||
|-----------|------------------------------------------------|
| `boolean` | Whether the collection is hierarchical. <br /> |

### obtain

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
AccessibilityNodeInfoCompat.CollectionInfoCompat obtain (int rowCount, 
                int columnCount, 
                boolean hierarchical, 
                int selectionMode)
```

Returns a cached instance if such is available otherwise a new one.

<br />

|                                                                                                                                                                                                                                                                                                       Parameters                                                                                                                                                                                                                                                                                                        ||
|-----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `rowCount`      | `int`: The number of rows. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `columnCount`   | `int`: The number of columns. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `hierarchical`  | `boolean`: Whether the collection is hierarchical. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `selectionMode` | `int`: The collection's selection mode, one of: - [SELECTION_MODE_NONE](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat#SELECTION_MODE_NONE) - [SELECTION_MODE_SINGLE](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat#SELECTION_MODE_SINGLE) - [SELECTION_MODE_MULTIPLE](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat#SELECTION_MODE_MULTIPLE) <br /> |

|                                                                                                 Returns                                                                                                 ||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------|
| [AccessibilityNodeInfoCompat.CollectionInfoCompat](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat) | An instance. <br /> |

### obtain

added in[version 25.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
AccessibilityNodeInfoCompat.CollectionInfoCompat obtain (int rowCount, 
                int columnCount, 
                boolean hierarchical)
```

Returns a cached instance if such is available otherwise a new one.

<br />

|                                Parameters                                 ||
|----------------|-----------------------------------------------------------|
| `rowCount`     | `int`: The number of rows. <br />                         |
| `columnCount`  | `int`: The number of columns. <br />                      |
| `hierarchical` | `boolean`: Whether the collection is hierarchical. <br /> |

|                                                                                                 Returns                                                                                                 ||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------|
| [AccessibilityNodeInfoCompat.CollectionInfoCompat](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat) | An instance. <br /> |

-

  ## Interfaces

  - [AccessibilityManagerCompat.AccessibilityStateChangeListener](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityManagerCompat.AccessibilityStateChangeListener)
  - [AccessibilityManagerCompat.TouchExplorationStateChangeListener](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityManagerCompat.TouchExplorationStateChangeListener)
-

  ## Classes

  - [AccessibilityEventCompat](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityEventCompat)
  - [AccessibilityManagerCompat](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityManagerCompat)
  - [AccessibilityManagerCompat.AccessibilityStateChangeListenerCompat](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityManagerCompat.AccessibilityStateChangeListenerCompat)
  - [AccessibilityNodeInfoCompat](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat)
  - [AccessibilityNodeInfoCompat.AccessibilityActionCompat](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat.AccessibilityActionCompat)
  - [AccessibilityNodeInfoCompat.CollectionInfoCompat](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat)
  - [AccessibilityNodeInfoCompat.CollectionItemInfoCompat](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat.CollectionItemInfoCompat)
  - [AccessibilityNodeInfoCompat.RangeInfoCompat](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat.RangeInfoCompat)
  - [AccessibilityNodeProviderCompat](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeProviderCompat)
  - [AccessibilityRecordCompat](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityRecordCompat)
  - [AccessibilityWindowInfoCompat](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityWindowInfoCompat)