CollectionItemInfoCompat
open class CollectionItemInfoCompat
kotlin.Any | |
↳ | androidx.core.view.accessibility.AccessibilityNodeInfoCompat.CollectionItemInfoCompat |
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
Public methods | |
---|---|
open Int |
Gets the column index at which the item is located. |
open Int |
Gets the number of columns the item spans. |
open Int |
Gets the row index at which the item is located. |
open Int |
Gets the number of rows the item spans. |
open Boolean |
Gets if the collection item is a heading. |
open Boolean |
Gets if the collection item is selected. |
open static AccessibilityNodeInfoCompat.CollectionItemInfoCompat! |
obtain(rowIndex: Int, rowSpan: Int, columnIndex: Int, columnSpan: Int, heading: Boolean, selected: Boolean) Returns a cached instance if such is available otherwise a new one. |
open static AccessibilityNodeInfoCompat.CollectionItemInfoCompat! |
Returns a cached instance if such is available otherwise a new one. |
Public methods
getColumnIndex
open fun getColumnIndex(): Int
Gets the column index at which the item is located.
Return | |
---|---|
Int |
The column index. |
getColumnSpan
open fun getColumnSpan(): Int
Gets the number of columns the item spans.
Return | |
---|---|
Int |
The column span. |
getRowIndex
open fun getRowIndex(): Int
Gets the row index at which the item is located.
Return | |
---|---|
Int |
The row index. |
getRowSpan
open fun getRowSpan(): Int
Gets the number of rows the item spans.
Return | |
---|---|
Int |
The row span. |
isHeading
open funisHeading(): Boolean
Deprecated: Use AccessibilityNodeInfoCompat#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
open fun isSelected(): Boolean
Gets if the collection item is selected.
Return | |
---|---|
Boolean |
If the item is selected. |
obtain
open static fun obtain(
rowIndex: Int,
rowSpan: Int,
columnIndex: Int,
columnSpan: Int,
heading: Boolean,
selected: Boolean
): AccessibilityNodeInfoCompat.CollectionItemInfoCompat!
Returns a cached instance if such is available otherwise a new one.
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. This should be set to false and the newer AccessibilityNodeInfoCompat#setHeading(boolean) used to identify headings. |
selected |
Boolean: Whether the item is selected. |
Return | |
---|---|
AccessibilityNodeInfoCompat.CollectionItemInfoCompat! |
An instance. |
obtain
open static fun obtain(
rowIndex: Int,
rowSpan: Int,
columnIndex: Int,
columnSpan: Int,
heading: Boolean
): AccessibilityNodeInfoCompat.CollectionItemInfoCompat!
Returns a cached instance if such is available otherwise a new one.
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. This should be set to false and the newer AccessibilityNodeInfoCompat#setHeading(boolean) used to identify headings. |
Return | |
---|---|
AccessibilityNodeInfoCompat.CollectionItemInfoCompat! |
An instance. |