# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Ctors | Methods | Inherited Methods

# AccessibilityNodeInfo.CollectionItemInfo

`public static final class AccessibilityNodeInfo.CollectionItemInfo`
`extends Object` ``

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

Class with information if a node is a collection item. Use `CollectionItemInfo#obtain(int, int, int, int, boolean)` to get an instance. Recycling is handled by the `AccessibilityNodeInfo` to which this object is attached.

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 constructors
`CollectionItemInfo(int rowIndex, int rowSpan, int columnIndex, int columnSpan, boolean heading)` Creates a new instance.
`CollectionItemInfo(int rowIndex, int rowSpan, int columnIndex, int columnSpan, boolean heading, boolean selected)` Creates a new instance.

### 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()` This method is deprecated. Use `AccessibilityNodeInfo#isHeading()`
`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.

### Inherited methods
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.

## Public constructors

### CollectionItemInfo

    public CollectionItemInfo (int rowIndex,
                    int rowSpan,
                    int columnIndex,
                    int columnSpan,
                    boolean heading)

Creates a new instance.

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.

### CollectionItemInfo

    public CollectionItemInfo (int rowIndex,
                    int rowSpan,
                    int columnIndex,
                    int columnSpan,
                    boolean heading,
                    boolean selected)

Creates a new instance.

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.
`selected` | `boolean`: Whether the item is selected.

## Public methods

### getColumnIndex

    public int getColumnIndex ()

Gets the column index at which the item is located.

Returns
`int` | The column index.

### getColumnSpan

    public int getColumnSpan ()

Gets the number of columns the item spans.

Returns
`int` | The column span.

### getRowIndex

    public int getRowIndex ()

Gets the row index at which the item is located.

Returns
`int` | The row index.

### getRowSpan

    public int getRowSpan ()

Gets the number of rows the item spans.

Returns
`int` | The row span.

### isHeading

    public boolean isHeading ()

This method is deprecated.
Use `AccessibilityNodeInfo#isHeading()`

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

Returns
`boolean` | If the item is a heading.

### isSelected

    public boolean isSelected ()

Gets if the collection item is selected.

Returns
`boolean` | If the item is selected.

### obtain

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

Obtains a pooled instance.

In most situations object pooling is not beneficial. Create a new instance using the constructor `CollectionItemInfo(int, int, int, int, boolean)` instead.

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. (Prefer `AccessibilityNodeInfo#setHeading(boolean)`).

Returns
`AccessibilityNodeInfo.CollectionItemInfo` |

### obtain

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

Obtains a pooled instance.

In most situations object pooling is not beneficial. Creates a new instance using the constructor `CollectionItemInfo(int, int, int, int, boolean, boolean)` instead.

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. (Prefer `AccessibilityNodeInfo#setHeading(boolean)`)
`selected` | `boolean`: Whether the item is selected.

Returns
`AccessibilityNodeInfo.CollectionItemInfo` |

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*