CollectionItemInfo
class CollectionItemInfo
| kotlin.Any | |
| ↳ | 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 for creating  | |
| Constants | |
|---|---|
| static Int | Items are sorted in ascending order (e.g., A-Z, 0-9). | 
| static Int | Items are sorted in descending order (e.g., Z-A, 9-0). | 
| static Int | There is no sort direction. | 
| static 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(rowIndex: Int, rowSpan: Int, columnIndex: Int, columnSpan: Int, heading: Boolean)Creates a new instance. | |
| CollectionItemInfo(rowIndex: Int, rowSpan: Int, columnIndex: Int, columnSpan: Int, heading: Boolean, selected: Boolean)Creates a new instance. | |
| Public methods | |
|---|---|
| Int | Gets the column index at which the item is located. | 
| Int | Gets the number of columns the item spans. | 
| String? | Gets the column title at which the item is located. | 
| Int | Gets the row index at which the item is located. | 
| Int | Gets the number of rows the item spans. | 
| String? | Gets the row title at which the item is located. | 
| Int | Gets the sort direction applied to the data associated with this node. | 
| Boolean | Gets if the collection item is a heading. | 
| Boolean | Gets if the collection item is selected. | 
| static AccessibilityNodeInfo.CollectionItemInfo! | Instantiates a new CollectionItemInfo. | 
| static AccessibilityNodeInfo.CollectionItemInfo! | obtain(rowIndex: Int, rowSpan: Int, columnIndex: Int, columnSpan: Int, heading: Boolean, selected: Boolean)Instantiates a new CollectionItemInfo. | 
Constants
SORT_DIRECTION_ASCENDING
static val SORT_DIRECTION_ASCENDING: Int
Items are sorted in ascending order (e.g., A-Z, 0-9).
Value: 1SORT_DIRECTION_DESCENDING
static val SORT_DIRECTION_DESCENDING: Int
Items are sorted in descending order (e.g., Z-A, 9-0).
Value: 2SORT_DIRECTION_NONE
static val SORT_DIRECTION_NONE: Int
There is no sort direction.
Value: 0SORT_DIRECTION_OTHER
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: 3Public constructors
CollectionItemInfo
CollectionItemInfo(
rowIndex: Int,
rowSpan: Int,
columnIndex: Int,
columnSpan: Int,
heading: Boolean)
Creates a new instance.
| Parameters | |
|---|---|
| rowIndex | Int: The row index at which the item is located. | 
| rowSpan | Int: The number of rows the item spans. | 
| columnIndex | Int: The column index at which the item is located. | 
| columnSpan | Int: The number of columns the item spans. | 
| heading | Boolean: Whether the item is a heading. | 
CollectionItemInfo
CollectionItemInfo(
rowIndex: Int,
rowSpan: Int,
columnIndex: Int,
columnSpan: Int,
heading: Boolean,
selected: Boolean)
Creates a new instance.
| Parameters | |
|---|---|
| rowIndex | Int: The row index at which the item is located. | 
| rowSpan | Int: The number of rows the item spans. | 
| columnIndex | Int: The column index at which the item is located. | 
| columnSpan | Int: The number of columns the item spans. | 
| heading | Boolean: Whether the item is a heading. | 
| selected | Boolean: Whether the item is selected. | 
Public methods
getColumnIndex
fun getColumnIndex(): Int
Gets the column index at which the item is located.
| Return | |
|---|---|
| Int | The column index. | 
getColumnSpan
fun getColumnSpan(): Int
Gets the number of columns the item spans.
| Return | |
|---|---|
| Int | The column span. | 
getColumnTitle
fun getColumnTitle(): String?
Gets the column title at which the item is located.
| Return | |
|---|---|
| String? | The column title. This value may be null. | 
getRowIndex
fun getRowIndex(): Int
Gets the row index at which the item is located.
| Return | |
|---|---|
| Int | The row index. | 
getRowSpan
fun getRowSpan(): Int
Gets the number of rows the item spans.
| Return | |
|---|---|
| Int | The row span. | 
getRowTitle
fun getRowTitle(): String?
Gets the row title at which the item is located.
| Return | |
|---|---|
| String? | The row title. This value may be null. | 
getSortDirection
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.
isHeading
funisHeading(): Boolean
Deprecated: Use AccessibilityNodeInfo.isHeading()
Gets if the collection item is a heading. For example, section heading, table header, etc.
| Return | |
|---|---|
| Boolean | If the item is a heading. | 
isSelected
fun isSelected(): Boolean
Gets if the collection item is selected.
| Return | |
|---|---|
| Boolean | If the item is selected. | 
obtain
static funobtain(
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) instead.
Instantiates a new CollectionItemInfo.
| Parameters | |
|---|---|
| rowIndex | Int: The row index at which the item is located. | 
| rowSpan | Int: The number of rows the item spans. | 
| columnIndex | Int: The column index at which the item is located. | 
| columnSpan | Int: The number of columns the item spans. | 
| heading | Boolean: Whether the item is a heading. (Prefer AccessibilityNodeInfo.setHeading(boolean)). | 
obtain
static funobtain(
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) instead.
Instantiates a new CollectionItemInfo.
| Parameters | |
|---|---|
| rowIndex | Int: The row index at which the item is located. | 
| rowSpan | Int: The number of rows the item spans. | 
| columnIndex | Int: The column index at which the item is located. | 
| columnSpan | Int: The number of columns the item spans. | 
| heading | Boolean: Whether the item is a heading. (Prefer AccessibilityNodeInfo.setHeading(boolean)). | 
| selected | Boolean: Whether the item is selected. | 
