Selection

@Immutable data class Selection
kotlin.Any
   ↳ androidx.ui.core.selection.Selection

Information about the current Selection.

Summary

Nested classes

data

Contains information about an anchor (start/end) of selection.

Public constructors

<init>(start: Selection.AnchorInfo, end: Selection.AnchorInfo, handlesCrossed: Boolean = false)

Information about the current Selection.

Public methods

Selection
merge(other: Selection?)

TextRange

Returns the selection offset information as a TextRange

Properties

Selection.AnchorInfo

Information about the end of the selection.

Boolean

The flag to show that the selection handles are dragged across each other.

Selection.AnchorInfo

Information about the start of the selection.

Public constructors

<init>

Selection(
    start: Selection.AnchorInfo,
    end: Selection.AnchorInfo,
    handlesCrossed: Boolean = false)

Information about the current Selection.

Public methods

merge

fun merge(other: Selection?): Selection

toTextRange

fun toTextRange(): TextRange

Returns the selection offset information as a TextRange

Properties

end

val end: Selection.AnchorInfo

Information about the end of the selection.

handlesCrossed

val handlesCrossed: Boolean

The flag to show that the selection handles are dragged across each other. After selection is initialized, if user drags one handle to cross the other handle, this is true, otherwise it's false.

start

val start: Selection.AnchorInfo

Information about the start of the selection.