Stay organized with collections
Save and categorize content based on your preferences.
class InputMethodSubtypeBuilder
InputMethodSubtypeBuilder is a builder class of InputMethodSubtype. This class is designed to be used with android.view.inputmethod.InputMethodManager#setAdditionalInputMethodSubtypes
. The developer needs to be aware of what each parameter means.
Summary
Public constructors
InputMethodSubtypeBuilder()
Public methods
setIsAsciiCapable
open fun setIsAsciiCapable(isAsciiCapable: Boolean): InputMethodSubtype.InputMethodSubtypeBuilder!
Parameters |
isAsciiCapable |
Boolean: should be true if this subtype is ASCII capable. If the subtype is ASCII capable, it should guarantee that the user can input ASCII characters with this subtype. This is important because many password fields only allow ASCII-characters. |
setIsAuxiliary
open fun setIsAuxiliary(isAuxiliary: Boolean): InputMethodSubtype.InputMethodSubtypeBuilder!
Parameters |
isAuxiliary |
Boolean: should true when this subtype is auxiliary, false otherwise. An auxiliary subtype has the following differences with a regular subtype: - An auxiliary subtype cannot be chosen as the default IME in Settings. - The framework will never switch to this subtype through android.view.inputmethod.InputMethodManager#switchToLastInputMethod . Note that the subtype will still be available in the IME switcher. The intent is to allow for IMEs to specify they are meant to be invoked temporarily in a one-shot way, and to return to the previous IME once finished (e.g. voice input). |
setOverridesImplicitlyEnabledSubtype
open fun setOverridesImplicitlyEnabledSubtype(overridesImplicitlyEnabledSubtype: Boolean): InputMethodSubtype.InputMethodSubtypeBuilder!
Parameters |
overridesImplicitlyEnabledSubtype |
Boolean: should be true if this subtype should be enabled by default if no other subtypes in the IME are enabled explicitly. Note that a subtype with this parameter set will not be shown in the list of subtypes in each IME's subtype enabler. A canonical use of this would be for an IME to supply an "automatic" subtype that adapts to the current system language. |
setPhysicalKeyboardHint
open fun setPhysicalKeyboardHint(
languageTag: ULocale?,
layoutType: String
): InputMethodSubtype.InputMethodSubtypeBuilder
Sets the physical keyboard hint information, such as language and layout. The system can use the hint information to automatically configure the physical keyboard for the subtype.
Parameters |
languageTag |
ULocale?: is the preferred physical keyboard BCP-47 language tag. This is used to match the keyboardLocale attribute in the physical keyboard definition. If it's null , the subtype's language tag will be used. |
layoutType |
String: is the preferred physical keyboard layout, which is used to match the keyboardLayoutType attribute in the physical keyboard definition. See android.hardware.input.InputManager#ACTION_QUERY_KEYBOARD_LAYOUTS . This value cannot be null . |
setSubtypeId
open fun setSubtypeId(subtypeId: Int): InputMethodSubtype.InputMethodSubtypeBuilder!
Parameters |
subtypeId |
Int: is the unique ID for this subtype. The input method framework keeps track of enabled subtypes by ID. When the IME package gets upgraded, enabled IDs will stay enabled even if other attributes are different. If the ID is unspecified or 0, Arrays.hashCode(new Object[] {locale, mode, extraValue, isAuxiliary, overridesImplicitlyEnabledSubtype, isAsciiCapable}) will be used instead. |
setSubtypeNameResId
open fun setSubtypeNameResId(subtypeNameResId: Int): InputMethodSubtype.InputMethodSubtypeBuilder!
Parameters |
subtypeNameResId |
Int: is the resource ID of the subtype name string. The string resource may have exactly one %s in it. If present, the %s part will be replaced with the locale's display name by the formatter. Please refer to getDisplayName for details. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-04-04 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-04-04 UTC."],[],[]]