TextInputService

open class TextInputService
kotlin.Any
   ↳ androidx.ui.input.TextInputService

Provide a communication with platform text input service.

Summary

Public constructors

<init>(platformTextInputService: PlatformTextInputService)

Provide a communication with platform text input service.

Public methods

open Unit

Notify the focused rectangle to the system.

open Unit

open Unit

Request showing onscreen keyboard

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

Start text input session for given client.

open Unit

Stop text input session.

Public constructors

<init>

TextInputService(platformTextInputService: PlatformTextInputService)

Provide a communication with platform text input service.

Public methods

notifyFocusedRect

open fun notifyFocusedRect(
    token: InputSessionToken,
    rect: Rect
): Unit

Notify the focused rectangle to the system.

onStateUpdated

open fun onStateUpdated(
    token: InputSessionToken,
    model: InputState
): Unit

showSoftwareKeyboard

open fun showSoftwareKeyboard(token: InputSessionToken): Unit

Request showing onscreen keyboard

There is no guarantee nor callback of the result of this API. The software keyboard or system service may silently ignores this request.

startInput

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

Start text input session for given client.

stopInput

open fun stopInput(token: InputSessionToken): Unit

Stop text input session.