SelectionPosition
class SelectionPosition : Parcelable
| kotlin.Any | |
| ↳ | android.view.accessibility.AccessibilityNodeInfo.SelectionPosition | 
A class which defines either the start or end of a selection that can span across multiple AccessibilityNodeInfo objects.
Summary
| Inherited constants | |
|---|---|
| Public constructors | |
|---|---|
| SelectionPosition(node: AccessibilityNodeInfo, offset: Int)Instantiates a new SelectionPosition. | |
| SelectionPosition(view: View, offset: Int)Instantiates a new SelectionPosition. | |
| SelectionPosition(view: View, virtualDescendantId: Int, offset: Int)Instantiates a new  | |
| Public methods | |
|---|---|
| Int | Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. | 
| Boolean | |
| AccessibilityNodeInfo? | getNode()Gets the node for  | 
| Int | Gets the offset for  | 
| Int | hashCode() | 
| Unit | writeToParcel(dest: Parcel, flags: Int)Flatten this object in to a Parcel. | 
| Properties | |
|---|---|
| static Parcelable.Creator<AccessibilityNodeInfo.SelectionPosition!> | |
Public constructors
SelectionPosition
SelectionPosition(
node: AccessibilityNodeInfo,
offset: Int)
Instantiates a new SelectionPosition.
| Parameters | |
|---|---|
| node | AccessibilityNodeInfo: The AccessibilityNodeInfofor the node of this selection. This value cannot benull. | 
| offset | Int: The offset for a SelectionPositionwithinview's text content, which should be a value between 0 and the length ofview's text. | 
SelectionPosition
SelectionPosition(
view: View,
offset: Int)
Instantiates a new SelectionPosition.
| Parameters | |
|---|---|
| view | View: The Viewcontaining the text associated with this selection position. This value cannot benull. | 
| offset | Int: The offset for a selection position within view's text content, which should be a value between 0 and the length ofview's text. | 
SelectionPosition
SelectionPosition(
view: View,
virtualDescendantId: Int,
offset: Int)
Instantiates a new SelectionPosition.
| Parameters | |
|---|---|
| view | View: The view whose virtual descendant is associated with the selection position. This value cannot be null. | 
| virtualDescendantId | Int: The ID of the virtual descendant within view's virtual subtree that contains the selection position. | 
| offset | Int: The offset for a selection position within the virtual descendant's text content, which should be a value between 0 and the length of the descendant's text. | 
Public methods
describeContents
fun describeContents(): Int
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(android.os.Parcel,int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.
| Return | |
|---|---|
| Int | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0orandroid.os.Parcelable#CONTENTS_FILE_DESCRIPTOR | 
equals
fun equals(other: Any?): Boolean
| Parameters | |
|---|---|
| obj | the reference object with which to compare. | 
| Return | |
|---|---|
| Boolean | trueif this object is the same as the obj argument;falseotherwise. | 
getNode
fun getNode(): AccessibilityNodeInfo?
Gets the node for this SelectionPosition 
 Note: This api can only be called from AccessibilityService.
| Return | |
|---|---|
| AccessibilityNodeInfo? | The node associated with thisSelectionPositionThis value may benull. | 
getOffset
fun getOffset(): Int
Gets the offset for this SelectionPosition.
| Return | |
|---|---|
| Int | A value from 0 to the length of getNode()'s content representing the offset of theSelectionPosition | 
writeToParcel
fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
Flatten this object in to a Parcel.
| Parameters | |
|---|---|
| dest | Parcel: This value cannot be null. | 
| flags | Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either0or a combination ofandroid.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES | 
Properties
CREATOR
static val CREATOR: Parcelable.Creator<AccessibilityNodeInfo.SelectionPosition!>
See Also
