Added in API level 35

Builder


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

The builder for CollectionInfo.

Summary

Public constructors

Creates a new Builder.

Public methods
AccessibilityNodeInfo.CollectionInfo

Creates a new CollectionInfo instance.

AccessibilityNodeInfo.CollectionInfo.Builder
setColumnCount(columnCount: Int)

Sets the column count.

AccessibilityNodeInfo.CollectionInfo.Builder
setHierarchical(hierarchical: Boolean)

Sets whether the collection is hierarchical.

AccessibilityNodeInfo.CollectionInfo.Builder
setImportantForAccessibilityItemCount(importantForAccessibilityItemCount: Int)

Sets the number of views considered important for accessibility.

AccessibilityNodeInfo.CollectionInfo.Builder
setItemCount(itemCount: Int)

Sets the number of items in the collection.

AccessibilityNodeInfo.CollectionInfo.Builder
setRowCount(rowCount: Int)

Sets the row count.

AccessibilityNodeInfo.CollectionInfo.Builder
setSelectionMode(selectionMode: Int)

Sets the selection mode.

Public constructors

Builder

Added in API level 35
Builder()

Creates a new Builder.

Public methods

build

Added in API level 35
fun build(): AccessibilityNodeInfo.CollectionInfo

Creates a new CollectionInfo instance.

Return
AccessibilityNodeInfo.CollectionInfo This value cannot be null.

setColumnCount

Added in API level 35
fun setColumnCount(columnCount: Int): AccessibilityNodeInfo.CollectionInfo.Builder

Sets the column count.

Parameters
columnCount Int: The number of columns in the collection.
Return
AccessibilityNodeInfo.CollectionInfo.Builder This builder. This value cannot be null.

setHierarchical

Added in API level 35
fun setHierarchical(hierarchical: Boolean): AccessibilityNodeInfo.CollectionInfo.Builder

Sets whether the collection is hierarchical.

Parameters
hierarchical Boolean: Whether the collection is hierarchical.
Return
AccessibilityNodeInfo.CollectionInfo.Builder This builder. This value cannot be null.

setImportantForAccessibilityItemCount

Added in API level 35
fun setImportantForAccessibilityItemCount(importantForAccessibilityItemCount: Int): AccessibilityNodeInfo.CollectionInfo.Builder

Sets the number of views considered important for accessibility.

Parameters
importantForAccessibilityItemCount Int: The number of items important for accessibility.
Return
AccessibilityNodeInfo.CollectionInfo.Builder This builder. This value cannot be null.

setItemCount

Added in API level 35
fun setItemCount(itemCount: Int): AccessibilityNodeInfo.CollectionInfo.Builder

Sets the number of items in the collection. Can be optionally set for ViewGroups with clear row and column semantics; should be set for all other clients.

Parameters
itemCount Int: The number of items in the collection. This should be set to UNDEFINED if the item count is not known.
Return
AccessibilityNodeInfo.CollectionInfo.Builder This builder. This value cannot be null.

setRowCount

Added in API level 35
fun setRowCount(rowCount: Int): AccessibilityNodeInfo.CollectionInfo.Builder

Sets the row count.

Parameters
rowCount Int: The number of rows in the collection.
Return
AccessibilityNodeInfo.CollectionInfo.Builder This builder. This value cannot be null.

setSelectionMode

Added in API level 35
fun setSelectionMode(selectionMode: Int): AccessibilityNodeInfo.CollectionInfo.Builder

Sets the selection mode.

Parameters
selectionMode Int: The selection mode.
Return
AccessibilityNodeInfo.CollectionInfo.Builder This builder. This value cannot be null.