Composables UI is out: our new component library for Compose Multiplatform ->
Class

InputTextSuggestionState

The state of an input text when suggestions are shown.

Source set: Common
class InputTextSuggestionState(
    val isCommittedByInputMethodEditor: Boolean = false,
    val isTransliterationSuggestionSelected: Boolean = false,
)

The state of an input text when suggestions are shown. This property specifies the different available states the input text can be in when there are text suggestions available, typically shown as a dialog window and when a user inputs a transliteration language specifically Chinese, Japanese, Korean, and Vietnamese.

On Android, this semantics property is only supported on SDK >= 37.

Parameters

isCommittedByInputMethodEditor whether the current text was committed by an input method editor done by the user, will stay false if the committed text was done programmatically, e.g. via Accessibility service.
isTransliterationSuggestionSelected whether a replacement text suggestion is selected to replace the transliterated text. If true, the text is from a transliteration language and is currently displaying one or multiple text suggestion replacements and that one of the suggestions is selected to replace the transliterated text. This does not indicate whether the text replacement suggestion has been committed. Will stay false for non-transliteration languages or if no suggestion is currently selected. If this were to be set to true for a non-transliteration language, it may affect accessibility services from announcing events correctly.

Secondary Constructors

constructor(
    isCommittedByInputMethodEditor: Boolean = false
) : this(isCommittedByInputMethodEditor, false)

Last updated: