Stay organized with collections
    
    
      
      Save and categorize content based on your preferences.
    
  
  
    
  
  
  
  
    
    
    
  
  
    
    
  
  
  public
  static
  
  
  class
  InputMethodSubtype.InputMethodSubtypeBuilder
  
    extends Object
  
  
  
  
  
  
  
    
    | java.lang.Object
     | 
  
  
  
    
      |    ↳ | 
    
    android.view.inputmethod.InputMethodSubtype.InputMethodSubtypeBuilder
     | 
  
  
  
    
  InputMethodSubtypeBuilder is a builder class of InputMethodSubtype.
 This class is designed to be used with
 InputMethodManager.setAdditionalInputMethodSubtypes(String, InputMethodSubtype).
 The developer needs to be aware of what each parameter means.
Summary
Inherited methods | 
  
    From class
      
        
          java.lang.Object
        
      
    
    
      
  
  
  
    
        
        
        
        
        
        Object
     | 
  
    
      
      clone()
      
      
        Creates and returns a copy of this object.
        
    
 
      
     | 
   
  
  
  
  
    
        
        
        
        
        
        boolean
     | 
  
    
      
      equals(Object obj)
      
      
        Indicates whether some other object is "equal to" this one.
        
    
 
      
     | 
   
  
  
  
  
    
        
        
        
        
        
        void
     | 
  
    
      
      finalize()
      
      
        Called by the garbage collector on an object when garbage collection
 determines that there are no more references to the object.
        
    
 
      
     | 
   
  
  
  
  
    
        
        
        
        final
        
        Class<?>
     | 
  
    
      
      getClass()
      
      
        Returns the runtime class of this Object.
        
    
 
      
     | 
   
  
  
  
  
    
        
        
        
        
        
        int
     | 
  
    
      
      hashCode()
      
      
        Returns a hash code value for the object.
        
    
 
      
     | 
   
  
  
  
  
    
        
        
        
        final
        
        void
     | 
  
    
      
      notify()
      
      
        Wakes up a single thread that is waiting on this object's
 monitor.
        
    
 
      
     | 
   
  
  
  
  
    
        
        
        
        final
        
        void
     | 
  
    
      
      notifyAll()
      
      
        Wakes up all threads that are waiting on this object's monitor.
        
    
 
      
     | 
   
  
  
  
  
    
        
        
        
        
        
        String
     | 
  
    
      
      toString()
      
      
        Returns a string representation of the object.
        
    
 
      
     | 
   
  
  
  
  
    
        
        
        
        final
        
        void
     | 
  
    
      
      wait(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
     | 
  
    
      
      wait(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
     | 
  
    
      
      wait()
      
      
        Causes the current thread to wait until it is awakened, typically
 by being notified or interrupted.
        
    
 
      
     | 
   
  
     
   
 | 
Public constructors
    
    
public InputMethodSubtypeBuilder ()
    
    
    
  
 
Public methods
    setIsAsciiCapable
    
public 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. | 
      
    
    
 
    setIsAuxiliary
    
public 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
   InputMethodManager.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). | 
      
    
    
 
    setLayoutLabelResource
    
public InputMethodSubtype.InputMethodSubtypeBuilder setLayoutLabelResource (int layoutLabelResId)
    
    
    
  Sets the layout label string resource identifier.
    
    | Parameters | 
      
        layoutLabelResId | 
        
          int: the layout label string resource identifier. | 
      
    
    
  
 
    setOverridesImplicitlyEnabledSubtype
    
public 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. | 
      
    
    
 
    setPhysicalKeyboardHint
    
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.
    
    | 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
 InputManager.ACTION_QUERY_KEYBOARD_LAYOUTS.
 This value cannot be null. | 
      
    
    
 
    setSubtypeId
    
public 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. | 
      
    
    
 
    setSubtypeNameOverride
    
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.
    
    | Parameters | 
      
        nameOverride | 
        
          CharSequence: is the name to set.
 This value cannot be null. | 
      
    
    
 
 
 
  
  
    
  
 
  
    
      
      
    
    
      
    
    
  
       
    
    
      
    
  
  
  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 2025-03-13 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 2025-03-13 UTC."],[],[]]