The Developer Preview for Android 11 is now available; test it out and share your feedback.

MoveCursorEditOp

data class MoveCursorEditOp : EditOperation
kotlin.Any
   ↳ androidx.ui.input.MoveCursorEditOp

An edit operation represents cursor moving.

If there is selection, cancel the selection first and move the cursor to the selection start position. Then perform the cursor movement.

Summary

Public constructors

<init>(amount: Int)

An edit operation represents cursor moving.

Public methods

Unit

Processes editing buffer with this edit operation.

Inherited extension functions

From androidx.compose
operator T

IMPORTANT: This global operator is TEMPORARY, and should be removed whenever an answer for contextual composers is reached.

Properties

Int

The amount of cursor movement.

Public constructors

<init>

MoveCursorEditOp(amount: Int)

An edit operation represents cursor moving.

If there is selection, cancel the selection first and move the cursor to the selection start position. Then perform the cursor movement.

Public methods

process

fun process(buffer: EditingBuffer): Unit

Processes editing buffer with this edit operation.

Properties

amount

val amount: Int

The amount of cursor movement.

If you want to move backward, pass negative value.