CollectionInfo
class CollectionInfo
kotlin.Any | |
↳ | android.view.accessibility.AccessibilityNodeInfo.CollectionInfo |
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.
Summary
Nested classes | |
---|---|
The builder for CollectionInfo. |
Constants | |
---|---|
static Int |
Selection mode where multiple items may be selected. |
static Int |
Selection mode where items are not selectable. |
static Int |
Selection mode where a single item may be selected. |
static Int |
Constant to denote a missing collection count. |
Public constructors | |
---|---|
CollectionInfo(rowCount: Int, columnCount: Int, hierarchical: Boolean) Creates a new instance. |
|
CollectionInfo(rowCount: Int, columnCount: Int, hierarchical: Boolean, selectionMode: Int) Creates a new instance. |
Public methods | |
---|---|
Int |
Gets the number of columns. |
Int |
Gets the number of items in the collection considered important for accessibility. |
Int |
Gets the number of items in the collection. |
Int |
Gets the number of rows. |
Int |
Gets the collection's selection mode. |
Boolean |
Gets if the collection is a hierarchically ordered. |
static AccessibilityNodeInfo.CollectionInfo! |
Obtains a pooled instance. |
static AccessibilityNodeInfo.CollectionInfo! |
Obtains a pooled instance. |
Constants
SELECTION_MODE_MULTIPLE
static val SELECTION_MODE_MULTIPLE: Int
Selection mode where multiple items may be selected.
Value: 2
SELECTION_MODE_NONE
static val SELECTION_MODE_NONE: Int
Selection mode where items are not selectable.
Value: 0
SELECTION_MODE_SINGLE
static val SELECTION_MODE_SINGLE: Int
Selection mode where a single item may be selected.
Value: 1
UNDEFINED
static val UNDEFINED: Int
Constant to denote a missing collection count. This should be used for mItemCount
and mImportantForAccessibilityItemCount
when values for those fields are not known.
Value: -1
Public constructors
CollectionInfo
CollectionInfo(
rowCount: Int,
columnCount: Int,
hierarchical: Boolean)
Creates a new instance.
Parameters | |
---|---|
rowCount |
Int: The number of rows. |
columnCount |
Int: The number of columns. |
hierarchical |
Boolean: Whether the collection is hierarchical. |
CollectionInfo
CollectionInfo(
rowCount: Int,
columnCount: Int,
hierarchical: Boolean,
selectionMode: Int)
Creates a new instance.
Parameters | |
---|---|
rowCount |
Int: The number of rows. |
columnCount |
Int: The number of columns. |
hierarchical |
Boolean: Whether the collection is hierarchical. |
selectionMode |
Int: The collection's selection mode. |
Public methods
getColumnCount
fun getColumnCount(): Int
Gets the number of columns.
Return | |
---|---|
Int |
The column count, or -1 if count is unknown. |
getImportantForAccessibilityItemCount
fun getImportantForAccessibilityItemCount(): Int
Gets the number of items in the collection considered important for accessibility.
Return | |
---|---|
Int |
The count of items important for accessibility, which may be UNDEFINED if the count is not known. |
getItemCount
fun getItemCount(): Int
Gets the number of items in the collection.
Return | |
---|---|
Int |
The count of items, which may be UNDEFINED if the count is not known. |
getRowCount
fun getRowCount(): Int
Gets the number of rows.
Return | |
---|---|
Int |
The row count, or -1 if count is unknown. |
getSelectionMode
fun getSelectionMode(): Int
Gets the collection's selection mode.
Return | |
---|---|
Int |
The collection's selection mode, one of: |
isHierarchical
fun isHierarchical(): Boolean
Gets if the collection is a hierarchically ordered.
Return | |
---|---|
Boolean |
Whether the collection is hierarchical. |
obtain
static funobtain(
rowCount: Int,
columnCount: Int,
hierarchical: Boolean
): AccessibilityNodeInfo.CollectionInfo!
Deprecated: Object pooling has been discontinued. Create a new instance using the constructor android.view.accessibility.AccessibilityNodeInfo.CollectionInfo#CollectionInfo(int,int,boolean)
instead.
Obtains a pooled instance.
Parameters | |
---|---|
rowCount |
Int: The number of rows, or -1 if count is unknown. |
columnCount |
Int: The number of columns, or -1 if count is unknown. |
hierarchical |
Boolean: Whether the collection is hierarchical. |
obtain
static funobtain(
rowCount: Int,
columnCount: Int,
hierarchical: Boolean,
selectionMode: Int
): AccessibilityNodeInfo.CollectionInfo!
Deprecated: Object pooling has been discontinued. Create a new instance using the constructor android.view.accessibility.AccessibilityNodeInfo.CollectionInfo#CollectionInfo(int,int,boolean,int)
instead.
Obtains a pooled instance.
Parameters | |
---|---|
rowCount |
Int: The number of rows. |
columnCount |
Int: The number of columns. |
hierarchical |
Boolean: Whether the collection is hierarchical. |
selectionMode |
Int: The collection's selection mode, one of: |