TextInputService
open class TextInputService
kotlin.Any | |
↳ | androidx.compose.ui.text.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 |
Hide onscreen keyboard |
open Unit |
notifyFocusedRect(token: InputSessionToken, rect: Rect) Notify the focused rectangle to the system. |
open Unit |
onStateUpdated(token: InputSessionToken, oldValue: TextFieldValue?, newValue: TextFieldValue) |
open Unit |
Request showing onscreen keyboard. |
open InputSessionToken |
startInput(value: TextFieldValue, imeOptions: ImeOptions, onEditCommand: (List<EditCommand>) -> Unit, onImeActionPerformed: (ImeAction) -> Unit) Start text input session for given client. |
open Unit |
stopInput(token: InputSessionToken) Stop text input session. |
Public constructors
<init>
TextInputService(platformTextInputService: PlatformTextInputService)
Provide a communication with platform text input service.
Public methods
hideSoftwareKeyboard
open fun hideSoftwareKeyboard(token: InputSessionToken): Unit
Hide onscreen keyboard
notifyFocusedRect
open fun notifyFocusedRect(
token: InputSessionToken,
rect: Rect
): Unit
Notify the focused rectangle to the system.
onStateUpdated
open fun onStateUpdated(
token: InputSessionToken,
oldValue: TextFieldValue?,
newValue: TextFieldValue
): Unit
showSoftwareKeyboard
open fun showSoftwareKeyboard(token: InputSessionToken): Unit
Request showing onscreen keyboard.
There is no guarantee that the keyboard will be shown. The software keyboard or system service may silently ignore this request.
startInput
open fun startInput(
value: TextFieldValue,
imeOptions: ImeOptions,
onEditCommand: (List<EditCommand>) -> Unit,
onImeActionPerformed: (ImeAction) -> Unit
): InputSessionToken
Start text input session for given client.