public class

AccessibilityNodeInfoCompat.CollectionItemInfoCompat

extends java.lang.Object

 java.lang.Object

↳androidx.core.view.accessibility.AccessibilityNodeInfoCompat.CollectionItemInfoCompat

Overview

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

Methods
public intgetColumnIndex()

Gets the column index at which the item is located.

public intgetColumnSpan()

Gets the number of columns the item spans.

public java.lang.StringgetColumnTitle()

Gets the column title at which the item is located.

public intgetRowIndex()

Gets the row index at which the item is located.

public intgetRowSpan()

Gets the number of rows the item spans.

public java.lang.StringgetRowTitle()

Gets the row title at which the item is located.

public booleanisHeading()

Gets if the collection item is a heading.

public booleanisSelected()

Gets if the collection item is selected.

public static AccessibilityNodeInfoCompat.CollectionItemInfoCompatobtain(int rowIndex, int rowSpan, int columnIndex, int columnSpan, boolean heading)

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

public static AccessibilityNodeInfoCompat.CollectionItemInfoCompatobtain(int rowIndex, int rowSpan, int columnIndex, int columnSpan, boolean heading, boolean selected)

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

Methods

public static AccessibilityNodeInfoCompat.CollectionItemInfoCompat obtain(int rowIndex, int rowSpan, int columnIndex, int columnSpan, boolean heading, boolean selected)

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

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. This should be set to false and the newer AccessibilityNodeInfoCompat.setHeading(boolean) used to identify headings.
selected: Whether the item is selected.

Returns:

An instance.

public static AccessibilityNodeInfoCompat.CollectionItemInfoCompat obtain(int rowIndex, int rowSpan, int columnIndex, int columnSpan, boolean heading)

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

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. This should be set to false and the newer AccessibilityNodeInfoCompat.setHeading(boolean) used to identify headings.

Returns:

An instance.

public int getColumnIndex()

Gets the column index at which the item is located.

Returns:

The column index.

public int getColumnSpan()

Gets the number of columns the item spans.

Returns:

The column span.

public int getRowIndex()

Gets the row index at which the item is located.

Returns:

The row index.

public int getRowSpan()

Gets the number of rows the item spans.

Returns:

The row span.

public boolean isHeading()

Deprecated: Use AccessibilityNodeInfoCompat.isHeading()

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()

Gets if the collection item is selected.

Returns:

If the item is selected.

public java.lang.String getRowTitle()

Gets the row title at which the item is located.

Returns:

The row title.

public java.lang.String getColumnTitle()

Gets the column title at which the item is located.

Returns:

The column title.