Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Ctors](https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder#pubctors) \| [Methods](https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder#inhmethods)

# InputMethodSubtype.InputMethodSubtypeBuilder

*** ** * ** ***

` public static class InputMethodSubtype.InputMethodSubtypeBuilder `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.view.inputmethod.InputMethodSubtype.InputMethodSubtypeBuilder |

<br />

*** ** * ** ***

InputMethodSubtypeBuilder is a builder class of InputMethodSubtype. This class is designed to be used with `https://developer.android.com/reference/android/view/inputmethod/InputMethodManager#setAdditionalInputMethodSubtypes(java.lang.String,%20android.view.inputmethod.InputMethodSubtype[])`. The developer needs to be aware of what each parameter means.

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder#InputMethodSubtypeBuilder()() ` |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder#build()() ` |
| ` https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder#setIsAsciiCapable(boolean)(boolean isAsciiCapable) ` |
| ` https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder#setIsAuxiliary(boolean)(boolean isAuxiliary) ` |
| ` https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder#setLanguageTag(java.lang.String)(https://developer.android.com/reference/java/lang/String languageTag) ` |
| ` https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder#setLayoutLabelNonLocalized(java.lang.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence layoutLabelNonLocalized) ` Sets the non-localized layout label. |
| ` https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder#setLayoutLabelResource(int)(int layoutLabelResId) ` Sets the layout label string resource identifier. |
| ` https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder#setOverridesImplicitlyEnabledSubtype(boolean)(boolean overridesImplicitlyEnabledSubtype) ` |
| ` https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder#setPhysicalKeyboardHint(android.icu.util.ULocale,%20java.lang.String)(https://developer.android.com/reference/android/icu/util/ULocale languageTag, https://developer.android.com/reference/java/lang/String layoutType) ` Sets the physical keyboard hint information, such as language and layout. |
| ` https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder#setSubtypeExtraValue(java.lang.String)(https://developer.android.com/reference/java/lang/String subtypeExtraValue) ` |
| ` https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder#setSubtypeIconResId(int)(int subtypeIconResId) ` |
| ` https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder#setSubtypeId(int)(int subtypeId) ` |
| ` https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder#setSubtypeLocale(java.lang.String)(https://developer.android.com/reference/java/lang/String subtypeLocale) ` |
| ` https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder#setSubtypeMode(java.lang.String)(https://developer.android.com/reference/java/lang/String subtypeMode) ` |
| ` https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder#setSubtypeNameOverride(java.lang.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence nameOverride) ` Sets the untranslatable name of the subtype. |
| ` https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder#setSubtypeNameResId(int)(int subtypeNameResId) ` |
| ` https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder` | ` https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder#setSubtypeShortLabel(java.lang.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence subtypeShortLabel) ` Sets the short label of the subtype. |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Public constructors

### InputMethodSubtypeBuilder

```
public InputMethodSubtypeBuilder ()
```

<br />

<br />

## Public methods

### build

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public InputMethodSubtype build ()
```

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype` | InputMethodSubtype using parameters in this InputMethodSubtypeBuilder. <br /> |

### setIsAsciiCapable

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public InputMethodSubtype.InputMethodSubtypeBuilder setIsAsciiCapable (boolean isAsciiCapable)
```

<br />

<br />

| 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. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder` | <br /> |

### setIsAuxiliary

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public InputMethodSubtype.InputMethodSubtypeBuilder setIsAuxiliary (boolean isAuxiliary)
```

<br />

<br />

| 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 `https://developer.android.com/reference/android/view/inputmethod/InputMethodManager#switchToLastInputMethod(android.os.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). <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder` | <br /> |

### setLanguageTag

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public InputMethodSubtype.InputMethodSubtypeBuilder setLanguageTag (String languageTag)
```

<br />

<br />

| Parameters ||
|---|---|
| `languageTag` | `String`: is the BCP-47 Language Tag supported by this subtype. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder` | <br /> |

### setLayoutLabelNonLocalized

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public InputMethodSubtype.InputMethodSubtypeBuilder setLayoutLabelNonLocalized (CharSequence layoutLabelNonLocalized)
```

Sets the non-localized layout label. This is used as the layout display name if the `https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype#getLayoutLabelResource()` is not set (`0`).

<br />

| Parameters ||
|---|---|
| `layoutLabelNonLocalized` | `CharSequence`: the non-localized layout label. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder` | This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype#getLayoutDisplayName(android.content.Context,%20android.content.pm.ApplicationInfo)`

### setLayoutLabelResource

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public InputMethodSubtype.InputMethodSubtypeBuilder setLayoutLabelResource (int layoutLabelResId)
```

Sets the layout label string resource identifier.

<br />

| Parameters ||
|---|---|
| `layoutLabelResId` | `int`: the layout label string resource identifier. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder` | This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype#getLayoutDisplayName(android.content.Context,%20android.content.pm.ApplicationInfo)`

### setOverridesImplicitlyEnabledSubtype

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public InputMethodSubtype.InputMethodSubtypeBuilder setOverridesImplicitlyEnabledSubtype (boolean overridesImplicitlyEnabledSubtype)
```

<br />

<br />

| 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. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder` | <br /> |

### setPhysicalKeyboardHint

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public InputMethodSubtype.InputMethodSubtypeBuilder setPhysicalKeyboardHint (ULocale languageTag, 
                String layoutType)
```

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.

<br />

| 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. <br /> |
| `layoutType` | `String`: is the preferred physical keyboard layout, which is used to match the keyboardLayoutType attribute in the physical keyboard definition. See `https://developer.android.com/reference/android/hardware/input/InputManager#ACTION_QUERY_KEYBOARD_LAYOUTS`. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder` | This value cannot be `null`. <br /> |

### setSubtypeExtraValue

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public InputMethodSubtype.InputMethodSubtypeBuilder setSubtypeExtraValue (String subtypeExtraValue)
```

<br />

<br />

| 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 `https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype#containsExtraValueKey(java.lang.String)` and `https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype#getExtraValueOf(java.lang.String)`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder` | <br /> |

### setSubtypeIconResId

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public InputMethodSubtype.InputMethodSubtypeBuilder setSubtypeIconResId (int subtypeIconResId)
```

<br />

<br />

| Parameters ||
|---|---|
| `subtypeIconResId` | `int`: is a resource ID of the subtype icon drawable. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder` | <br /> |

### setSubtypeId

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public InputMethodSubtype.InputMethodSubtypeBuilder setSubtypeId (int subtypeId)
```

<br />

<br />

| 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. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder` | <br /> |

### setSubtypeLocale

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public InputMethodSubtype.InputMethodSubtypeBuilder setSubtypeLocale (String subtypeLocale)
```

<br />

<br />

| Parameters ||
|---|---|
| `subtypeLocale` | `String`: is the locale supported by this subtype. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder` | <br /> |

### setSubtypeMode

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public InputMethodSubtype.InputMethodSubtypeBuilder setSubtypeMode (String subtypeMode)
```

<br />

<br />

| Parameters ||
|---|---|
| `subtypeMode` | `String`: is the mode supported by this subtype. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder` | <br /> |

### setSubtypeNameOverride

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public InputMethodSubtype.InputMethodSubtypeBuilder setSubtypeNameOverride (CharSequence nameOverride)
```

Sets the untranslatable name of the subtype. This string is used as the subtype's display name if subtype's name res Id is 0.

<br />

| Parameters ||
|---|---|
| `nameOverride` | `CharSequence`: is the name to set. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder` | This value cannot be `null`. <br /> |

### setSubtypeNameResId

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public InputMethodSubtype.InputMethodSubtypeBuilder setSubtypeNameResId (int subtypeNameResId)
```

<br />

<br />

| 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 `https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype#getDisplayName(android.content.Context,%20java.lang.String,%20android.content.pm.ApplicationInfo)` for details. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder` | <br /> |

### setSubtypeShortLabel

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public InputMethodSubtype.InputMethodSubtypeBuilder setSubtypeShortLabel (CharSequence subtypeShortLabel)
```

Sets the short label of the subtype. This is a non-localized string used to represent the subtype in compact UI elements where the full display name is too long. It may be used in place of an icon in some UI surfaces if a subtype icon is not specified. It is recommended that the short label is visually compact, around the size of two or three Latin letters to avoid visual truncation in limited-space UI surfaces. Examples include an abbreviation, a locale code, a symbol, or an emoji.

<br />

| Parameters ||
|---|---|
| `subtypeShortLabel` | `CharSequence`: the short label. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.InputMethodSubtypeBuilder` | This value cannot be `null`. <br /> |