Added in API level 33

Builder


class Builder
kotlin.Any
   ↳ android.view.accessibility.AccessibilityNodeInfo.CollectionItemInfo.Builder

Builder for creating CollectionItemInfo objects.

Summary

Public constructors

Creates a new Builder.

Public methods
AccessibilityNodeInfo.CollectionItemInfo

Builds and returns a CollectionItemInfo.

AccessibilityNodeInfo.CollectionItemInfo.Builder
setColumnIndex(columnIndex: Int)

Sets the column index at which the item is located.

AccessibilityNodeInfo.CollectionItemInfo.Builder
setColumnSpan(columnSpan: Int)

Sets the number of columns the item spans.

AccessibilityNodeInfo.CollectionItemInfo.Builder
setColumnTitle(columnTitle: String?)

Sets the column title at which the item is located.

AccessibilityNodeInfo.CollectionItemInfo.Builder
setHeading(heading: Boolean)

Sets the collection item is a heading.

AccessibilityNodeInfo.CollectionItemInfo.Builder
setRowIndex(rowIndex: Int)

Sets the row index at which the item is located.

AccessibilityNodeInfo.CollectionItemInfo.Builder
setRowSpan(rowSpan: Int)

Sets the number of rows the item spans.

AccessibilityNodeInfo.CollectionItemInfo.Builder
setRowTitle(rowTitle: String?)

Sets the row title at which the item is located.

AccessibilityNodeInfo.CollectionItemInfo.Builder
setSelected(selected: Boolean)

Sets the collection item is selected.

AccessibilityNodeInfo.CollectionItemInfo.Builder
setSortDirection(sortDirection: Int)

Sets the sort direction for this item.

Public constructors

Builder

Added in API level 33
Builder()

Creates a new Builder.

Public methods

build

Added in API level 33
fun build(): AccessibilityNodeInfo.CollectionItemInfo

Builds and returns a CollectionItemInfo.

Return
AccessibilityNodeInfo.CollectionItemInfo This value cannot be null.

setColumnIndex

Added in API level 33
fun setColumnIndex(columnIndex: Int): AccessibilityNodeInfo.CollectionItemInfo.Builder

Sets the column index at which the item is located.

Parameters
columnIndex Int: The column index
Return
AccessibilityNodeInfo.CollectionItemInfo.Builder This builder This value cannot be null.

setColumnSpan

Added in API level 33
fun setColumnSpan(columnSpan: Int): AccessibilityNodeInfo.CollectionItemInfo.Builder

Sets the number of columns the item spans.

Parameters
columnSpan Int: The number of columns spans
Return
AccessibilityNodeInfo.CollectionItemInfo.Builder This builder This value cannot be null.

setColumnTitle

Added in API level 33
fun setColumnTitle(columnTitle: String?): AccessibilityNodeInfo.CollectionItemInfo.Builder

Sets the column title at which the item is located.

Parameters
columnTitle String?: The column title This value may be null.
Return
AccessibilityNodeInfo.CollectionItemInfo.Builder This builder This value cannot be null.

setHeading

Added in API level 33
fun setHeading(heading: Boolean): AccessibilityNodeInfo.CollectionItemInfo.Builder

Sets the collection item is a heading.

Parameters
heading Boolean: The heading state
Return
AccessibilityNodeInfo.CollectionItemInfo.Builder This builder This value cannot be null.

setRowIndex

Added in API level 33
fun setRowIndex(rowIndex: Int): AccessibilityNodeInfo.CollectionItemInfo.Builder

Sets the row index at which the item is located.

Parameters
rowIndex Int: The row index
Return
AccessibilityNodeInfo.CollectionItemInfo.Builder This builder This value cannot be null.

setRowSpan

Added in API level 33
fun setRowSpan(rowSpan: Int): AccessibilityNodeInfo.CollectionItemInfo.Builder

Sets the number of rows the item spans.

Parameters
rowSpan Int: The number of rows spans
Return
AccessibilityNodeInfo.CollectionItemInfo.Builder This builder This value cannot be null.

setRowTitle

Added in API level 33
fun setRowTitle(rowTitle: String?): AccessibilityNodeInfo.CollectionItemInfo.Builder

Sets the row title at which the item is located.

Parameters
rowTitle String?: The row title This value may be null.
Return
AccessibilityNodeInfo.CollectionItemInfo.Builder This builder This value cannot be null.

setSelected

Added in API level 33
fun setSelected(selected: Boolean): AccessibilityNodeInfo.CollectionItemInfo.Builder

Sets the collection item is selected.

Parameters
selected Boolean: The number of rows spans
Return
AccessibilityNodeInfo.CollectionItemInfo.Builder This builder This value cannot be null.

setSortDirection

fun setSortDirection(sortDirection: Int): AccessibilityNodeInfo.CollectionItemInfo.Builder

Sets the sort direction for this item.

Valid only if AccessibilityNodeInfo.isHeading() returns true. Indicates that collection content associated with this heading is presented in the indicated sort direction. It should only be called by accessibility providers. For accessibility services, see getSortDirection() to query the current state.

Parameters
sortDirection Int: the sort direction of this collection item info Value is android.view.accessibility.AccessibilityNodeInfo.CollectionItemInfo#SORT_DIRECTION_NONE, android.view.accessibility.AccessibilityNodeInfo.CollectionItemInfo#SORT_DIRECTION_ASCENDING, android.view.accessibility.AccessibilityNodeInfo.CollectionItemInfo#SORT_DIRECTION_DESCENDING, or android.view.accessibility.AccessibilityNodeInfo.CollectionItemInfo#SORT_DIRECTION_OTHER
Return
AccessibilityNodeInfo.CollectionItemInfo.Builder This builder This value cannot be null.
Exceptions
java.lang.IllegalArgumentException If sortDirection is not one of: