InputTextSuggestionState


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.

Summary

Public constructors

InputTextSuggestionState(
    isCommittedByInputMethodEditor: Boolean,
    isTransliterationSuggestionSelected: Boolean
)
Cmn

Public functions

open operator Boolean
equals(other: Any?)
Cmn
open Int
Cmn
open String
Cmn

Public properties

Boolean

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.

Cmn
Boolean

whether a replacement text suggestion is selected to replace the transliterated text.

Cmn

Public constructors

InputTextSuggestionState

InputTextSuggestionState(
    isCommittedByInputMethodEditor: Boolean = false,
    isTransliterationSuggestionSelected: Boolean = false
)
Parameters
isCommittedByInputMethodEditor: Boolean = false

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: Boolean = false

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.

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

isCommittedByInputMethodEditor

val isCommittedByInputMethodEditorBoolean

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

val isTransliterationSuggestionSelectedBoolean

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.