Android APIs
public static final class

AccessibilityNodeInfo.CollectionItemInfo

extends Object
java.lang.Object
   ↳ android.view.accessibility.AccessibilityNodeInfo.CollectionItemInfo

Class Overview

Class with information if a node is a collection item. Use obtain(int, int, int, int, boolean) to get an instance.

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
int getColumnIndex()
Gets the column index at which the item is located.
int getColumnSpan()
Gets the number of columns the item spans.
int getRowIndex()
Gets the row index at which the item is located.
int getRowSpan()
Gets the number of rows the item spans.
boolean isHeading()
Gets if the collection item is a heading.
boolean isSelected()
Gets if the collection item is selected.
static AccessibilityNodeInfo.CollectionItemInfo obtain(int rowIndex, int rowSpan, int columnIndex, int columnSpan, boolean heading)
Obtains a pooled instance.
static AccessibilityNodeInfo.CollectionItemInfo obtain(int rowIndex, int rowSpan, int columnIndex, int columnSpan, boolean heading, boolean selected)
Obtains a pooled instance.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public int getColumnIndex ()

Added in API level 19

Gets the column index at which the item is located.

Returns
  • The column index.

public int getColumnSpan ()

Added in API level 19

Gets the number of columns the item spans.

Returns
  • The column span.

public int getRowIndex ()

Added in API level 19

Gets the row index at which the item is located.

Returns
  • The row index.

public int getRowSpan ()

Added in API level 19

Gets the number of rows the item spans.

Returns
  • The row span.

public boolean isHeading ()

Added in API level 19

Gets if the collection item is a heading. For example, section heading, table header, etc.

Returns
  • If the item is a heading.

public boolean isSelected ()

Added in API level 21

Gets if the collection item is selected.

Returns
  • If the item is selected.

public static AccessibilityNodeInfo.CollectionItemInfo obtain (int rowIndex, int rowSpan, int columnIndex, int columnSpan, boolean heading)

Added in API level 19

Obtains a pooled instance.

Parameters
rowIndex The row index at which the item is located.
rowSpan The number of rows the item spans.
columnIndex The column index at which the item is located.
columnSpan The number of columns the item spans.
heading Whether the item is a heading.

public static AccessibilityNodeInfo.CollectionItemInfo obtain (int rowIndex, int rowSpan, int columnIndex, int columnSpan, boolean heading, boolean selected)

Added in API level 21

Obtains a pooled instance.

Parameters
rowIndex The row index at which the item is located.
rowSpan The number of rows the item spans.
columnIndex The column index at which the item is located.
columnSpan The number of columns the item spans.
heading Whether the item is a heading.
selected Whether the item is selected.