EditorModel

data class EditorModel
kotlin.Any
   ↳ androidx.ui.core.EditorModel

A class holding information about the editing state.

The input service updates text selection or cursor as well as text. You can observe and control the selection, cursor and text altogether.

Summary

Public constructors

<init>(text: String = "", selection: TextRange = TextRange(0, 0))

A class holding information about the editing state.

Properties

TextRange

the selection range.

String

the text will be rendered in the TextField.

Public constructors

<init>

EditorModel(
    text: String = "",
    selection: TextRange = TextRange(0, 0))

A class holding information about the editing state.

The input service updates text selection or cursor as well as text. You can observe and control the selection, cursor and text altogether.

Parameters
text: String = "" the text will be rendered in the TextField.
selection: TextRange = TextRange(0, 0) the selection range. If the selection is collapsed, it represents cursor location. Do not specify outside of the text buffer.

Properties

selection

val selection: TextRange

the selection range. If the selection is collapsed, it represents cursor location. Do not specify outside of the text buffer.

text

val text: String

the text will be rendered in the TextField.