Most visited

Recently visited

Added in API level 19

InputMethodSubtype.InputMethodSubtypeBuilder

public static class InputMethodSubtype.InputMethodSubtypeBuilder
extends Object

java.lang.Object
    android.view.inputmethod.InputMethodSubtype.InputMethodSubtypeBuilder


InputMethodSubtypeBuilder是InputMethodSubtype的构建器类。 本课程旨在与setAdditionalInputMethodSubtypes(String, InputMethodSubtype[])一起使用。 开发人员需要了解每个参数的含义。

摘要(Summary)

Public constructors

InputMethodSubtype.InputMethodSubtypeBuilder()

公共方法(Public methods)

InputMethodSubtype build()
InputMethodSubtype.InputMethodSubtypeBuilder setIsAsciiCapable(boolean isAsciiCapable)
InputMethodSubtype.InputMethodSubtypeBuilder setIsAuxiliary(boolean isAuxiliary)
InputMethodSubtype.InputMethodSubtypeBuilder setLanguageTag(String languageTag)
InputMethodSubtype.InputMethodSubtypeBuilder setOverridesImplicitlyEnabledSubtype(boolean overridesImplicitlyEnabledSubtype)
InputMethodSubtype.InputMethodSubtypeBuilder setSubtypeExtraValue(String subtypeExtraValue)
InputMethodSubtype.InputMethodSubtypeBuilder setSubtypeIconResId(int subtypeIconResId)
InputMethodSubtype.InputMethodSubtypeBuilder setSubtypeId(int subtypeId)
InputMethodSubtype.InputMethodSubtypeBuilder setSubtypeLocale(String subtypeLocale)
InputMethodSubtype.InputMethodSubtypeBuilder setSubtypeMode(String subtypeMode)
InputMethodSubtype.InputMethodSubtypeBuilder setSubtypeNameResId(int subtypeNameResId)

继承方法(Inherited methods)

From class java.lang.Object

Public constructors

InputMethodSubtype.InputMethodSubtypeBuilder

Added in API level 19
InputMethodSubtype.InputMethodSubtypeBuilder ()

公共方法(Public methods)

build

Added in API level 19
InputMethodSubtype build ()

返回(Returns)
InputMethodSubtype InputMethodSubtype using parameters in this InputMethodSubtypeBuilder.

setIsAsciiCapable

Added in API level 19
InputMethodSubtype.InputMethodSubtypeBuilder setIsAsciiCapable (boolean isAsciiCapable)

参数(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.
返回(Returns)
InputMethodSubtype.InputMethodSubtypeBuilder

setIsAuxiliary

Added in API level 19
InputMethodSubtype.InputMethodSubtypeBuilder setIsAuxiliary (boolean isAuxiliary)

参数(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 switchToLastInputMethod(IBinder). 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).
返回(Returns)
InputMethodSubtype.InputMethodSubtypeBuilder

setLanguageTag

Added in API level 24
InputMethodSubtype.InputMethodSubtypeBuilder setLanguageTag (String languageTag)

参数(Parameters)
languageTag String: is the BCP-47 Language Tag supported by this subtype.
返回(Returns)
InputMethodSubtype.InputMethodSubtypeBuilder

setOverridesImplicitlyEnabledSubtype

Added in API level 19
InputMethodSubtype.InputMethodSubtypeBuilder setOverridesImplicitlyEnabledSubtype (boolean overridesImplicitlyEnabledSubtype)

参数(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.
返回(Returns)
InputMethodSubtype.InputMethodSubtypeBuilder

setSubtypeExtraValue

Added in API level 19
InputMethodSubtype.InputMethodSubtypeBuilder setSubtypeExtraValue (String subtypeExtraValue)

参数(Parameters)
subtypeExtraValue String: is the extra value of the subtype. This string is free-form, but the API supplies tools to deal with a key-value comma-separated list; see containsExtraValueKey(String) and getExtraValueOf(String).
返回(Returns)
InputMethodSubtype.InputMethodSubtypeBuilder

setSubtypeIconResId

Added in API level 19
InputMethodSubtype.InputMethodSubtypeBuilder setSubtypeIconResId (int subtypeIconResId)

参数(Parameters)
subtypeIconResId int: is a resource ID of the subtype icon drawable.
返回(Returns)
InputMethodSubtype.InputMethodSubtypeBuilder

setSubtypeId

Added in API level 19
InputMethodSubtype.InputMethodSubtypeBuilder setSubtypeId (int subtypeId)

参数(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.
返回(Returns)
InputMethodSubtype.InputMethodSubtypeBuilder

setSubtypeLocale

Added in API level 19
InputMethodSubtype.InputMethodSubtypeBuilder setSubtypeLocale (String subtypeLocale)

参数(Parameters)
subtypeLocale String: is the locale supported by this subtype.
返回(Returns)
InputMethodSubtype.InputMethodSubtypeBuilder

setSubtypeMode

Added in API level 19
InputMethodSubtype.InputMethodSubtypeBuilder setSubtypeMode (String subtypeMode)

参数(Parameters)
subtypeMode String: is the mode supported by this subtype.
返回(Returns)
InputMethodSubtype.InputMethodSubtypeBuilder

setSubtypeNameResId

Added in API level 19
InputMethodSubtype.InputMethodSubtypeBuilder setSubtypeNameResId (int subtypeNameResId)

参数(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(Context, String, ApplicationInfo) for details.
返回(Returns)
InputMethodSubtype.InputMethodSubtypeBuilder

Hooray!