EditProcessor
class EditProcessor
kotlin.Any | |
↳ | androidx.ui.input.EditProcessor |
The core editing implementation
This class accepts latest text edit state from developer and also receives edit operations from IME.
Summary
Public constructors |
|
---|---|
<init>() The core editing implementation |
Public methods |
|
---|---|
InputState |
onEditCommands(ops: List<EditOperation>) Must be called whenever new edit operations sent from IMEs arrives. |
Unit |
onNewState(model: InputState, textInputService: TextInputService?, token: InputSessionToken) Must be called whenever new editor model arrives. |
Public constructors
<init>
EditProcessor()
The core editing implementation
This class accepts latest text edit state from developer and also receives edit operations from IME.
Public methods
onEditCommands
fun onEditCommands(ops: List<EditOperation>): InputState
Must be called whenever new edit operations sent from IMEs arrives.
This method updates internal editing buffer with the given edit operations and returns the latest editor state representation of the editing buffer.
onNewState
fun onNewState(
model: InputState,
textInputService: TextInputService?,
token: InputSessionToken
): Unit
Must be called whenever new editor model arrives.
This method updates the internal editing buffer with the given editor model. This method may tell the IME about the selection offset changes or extracted text changes.