public class

AccessibilityNodeInfoCompat.CollectionInfoCompat

extends java.lang.Object

 java.lang.Object

↳androidx.core.view.accessibility.AccessibilityNodeInfoCompat.CollectionInfoCompat

Overview

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

Fields
public static final intSELECTION_MODE_MULTIPLE

Selection mode where multiple items may be selected.

public static final intSELECTION_MODE_NONE

Selection mode where items are not selectable.

public static final intSELECTION_MODE_SINGLE

Selection mode where a single item may be selected.

Methods
public intgetColumnCount()

Gets the number of columns.

public intgetRowCount()

Gets the number of rows.

public intgetSelectionMode()

Gets the collection's selection mode.

public booleanisHierarchical()

Gets if the collection is a hierarchically ordered.

public static AccessibilityNodeInfoCompat.CollectionInfoCompatobtain(int rowCount, int columnCount, boolean hierarchical)

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

public static AccessibilityNodeInfoCompat.CollectionInfoCompatobtain(int rowCount, int columnCount, boolean hierarchical, int selectionMode)

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

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Fields

public static final int SELECTION_MODE_NONE

Selection mode where items are not selectable.

public static final int SELECTION_MODE_SINGLE

Selection mode where a single item may be selected.

public static final int SELECTION_MODE_MULTIPLE

Selection mode where multiple items may be selected.

Methods

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

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

Parameters:

rowCount: The number of rows.
columnCount: The number of columns.
hierarchical: Whether the collection is hierarchical.
selectionMode: The collection's selection mode, one of:


Returns:

An instance.

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

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

Parameters:

rowCount: The number of rows, or -1 if count is unknown.
columnCount: The number of columns , or -1 if count is unknown.
hierarchical: Whether the collection is hierarchical.

Returns:

An instance.

public int getColumnCount()

Gets the number of columns.

Returns:

The column count, or -1 if count is unknown.

public int getRowCount()

Gets the number of rows.

Returns:

The row count, or -1 if count is unknown.

public boolean isHierarchical()

Gets if the collection is a hierarchically ordered.

Returns:

Whether the collection is hierarchical.

public int getSelectionMode()

Gets the collection's selection mode.

Returns:

The collection's selection mode, one of: