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

PlatformTextInputService

interface PlatformTextInputService
androidx.ui.input.PlatformTextInputService

Platform specific text input service.

Summary

Public methods

abstract Unit

Hide software keyboard

abstract Unit

Notify the focused rectangle to the system.

abstract Unit

abstract Unit

Request showing onscreen keyboard

abstract Unit
startInput(initModel: InputState, keyboardType: KeyboardType, imeAction: ImeAction, onEditCommand: (List<EditOperation>) -> Unit, onImeActionPerformed: (ImeAction) -> Unit)

Start text input session for given client.

abstract Unit

Stop text input session.

Public methods

hideSoftwareKeyboard

abstract fun hideSoftwareKeyboard(): Unit

Hide software keyboard

notifyFocusedRect

abstract fun notifyFocusedRect(rect: Rect): Unit

Notify the focused rectangle to the system.

onStateUpdated

abstract fun onStateUpdated(model: InputState): Unit

showSoftwareKeyboard

abstract fun showSoftwareKeyboard(): Unit

Request showing onscreen keyboard

There is no guarantee nor callback of the result of this API.

startInput

abstract fun startInput(
    initModel: InputState,
    keyboardType: KeyboardType,
    imeAction: ImeAction,
    onEditCommand: (List<EditOperation>) -> Unit,
    onImeActionPerformed: (ImeAction) -> Unit
): Unit

Start text input session for given client.

stopInput

abstract fun stopInput(): Unit

Stop text input session.