Added in API level 37.2
Builder
class Builder
| kotlin.Any | |
| ↳ | android.view.accessibility.AccessibilityNodeInfo.SelectionPosition.Builder |
Builder for creating SelectionPosition objects.
Summary
| Public constructors | |
|---|---|
Builder(node: AccessibilityNodeInfo, offset: Int)Creates a new Builder. |
|
|
Creates a new Builder. |
|
|
Creates a new Builder. |
|
| Public methods | |
|---|---|
| AccessibilityNodeInfo.SelectionPosition |
build()Creates a new |
| AccessibilityNodeInfo.SelectionPosition.Builder |
setOffsetType(offsetType: Int)Sets the offset type for the position. |
Public constructors
Builder
Added in API level 37.2
Builder(
node: AccessibilityNodeInfo,
offset: Int)
Creates a new Builder.
By default, the offset type is initialized to OFFSET_TYPE_TEXT.
| Parameters | |
|---|---|
node |
AccessibilityNodeInfo: The AccessibilityNodeInfo for the node of this position. This value cannot be null. |
offset |
Int: The offset for the position. |
Builder
Added in API level 37.2
Builder(
view: View,
offset: Int)
Creates a new Builder.
By default, the offset type is initialized to OFFSET_TYPE_TEXT.
| Parameters | |
|---|---|
view |
View: The View containing the text associated with this selection. This value cannot be null. |
offset |
Int: The offset for the position. |
Builder
Added in API level 37.2
Builder(
view: View,
virtualDescendantId: Int,
offset: Int)
Creates a new Builder.
By default, the offset type is initialized to OFFSET_TYPE_TEXT.
| Parameters | |
|---|---|
view |
View: The view whose virtual descendant is associated with the selection position. This value cannot be null. |
virtualDescendantId |
Int: The virtual descendant id. |
offset |
Int: The offset for the position. |
Public methods
build
Added in API level 37.2
fun build(): AccessibilityNodeInfo.SelectionPosition
Creates a new SelectionPosition instance.
| Return | |
|---|---|
AccessibilityNodeInfo.SelectionPosition |
This value cannot be null. |
setOffsetType
Added in API level 37.2
fun setOffsetType(offsetType: Int): AccessibilityNodeInfo.SelectionPosition.Builder
Sets the offset type for the position.
| Parameters | |
|---|---|
offsetType |
Int: The scheme dictating how the offset should be interpreted. Value is one of the following: |
| Return | |
|---|---|
AccessibilityNodeInfo.SelectionPosition.Builder |
This builder. This value cannot be null. |