Google is committed to advancing racial equity for Black communities. See how.
Added in API level 3

InputMethodInfo

class InputMethodInfo : Parcelable
kotlin.Any
   ↳ android.view.inputmethod.InputMethodInfo

This class is used to specify meta information of an input method.

It should be defined in an XML resource file with an <input-method> element. For more information, see the guide to Creating an Input Method.

Summary

XML attributes

android:isDefault Set to true in all of the configurations for which this input method should be considered an option as the default.
android:settingsActivity Component name of an activity that allows the user to modify the settings for this service.
android:supportsInlineSuggestions Specifies whether the IME supports showing inline suggestions.
android:supportsSwitchingToNextInputMethod Set to true if this input method supports ways to switch to a next input method (for example, a globe key.).

Inherited constants

Public constructors

<init>(context: Context!, service: ResolveInfo!)

Constructor.

<init>(packageName: String!, className: String!, label: CharSequence!, settingsActivity: String!)

Temporary API for creating a built-in input method for test.

Public methods

Int

Unit
dump(pw: Printer!, prefix: String!)

Boolean
equals(other: Any?)

Used to test whether the given parameter object is an InputMethodInfo and its Id is the same to this one.

ComponentName!

Return the component of the service that implements this input method.

String!

Return a unique ID for this input method.

Int

Return the resource identifier of a resource inside of this input method's .

String!

Return the .

ServiceInfo!

Return the raw information about the Service implementing this input method.

String!

Return the class name of the service component that implements this input method.

String!

Return the class name of an activity that provides a settings UI for the input method.

InputMethodSubtype!
getSubtypeAt(index: Int)

Return the Input Method's subtype at the specified index.

Int

Return the count of the subtypes of Input Method.

Int

Drawable!

Load the user-displayed icon for this input method.

CharSequence!

Load the user-displayed label for this input method.

String

Unit
writeToParcel(dest: Parcel!, flags: Int)

Used to package this object into a Parcel.

Properties

static Parcelable.Creator<InputMethodInfo!>

Used to make this class parcelable.

XML attributes

android:isDefault

android:isDefault
Set to true in all of the configurations for which this input method should be considered an option as the default.

May be a boolean value, such as "true" or "false".

android:settingsActivity

android:settingsActivity
Component name of an activity that allows the user to modify the settings for this service.

May be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character;

android:supportsInlineSuggestions

android:supportsInlineSuggestions
Specifies whether the IME supports showing inline suggestions.

May be a boolean value, such as "true" or "false".

android:supportsSwitchingToNextInputMethod

android:supportsSwitchingToNextInputMethod
Set to true if this input method supports ways to switch to a next input method (for example, a globe key.). When this is true and InputMethodManager#shouldOfferSwitchingToNextInputMethod() returns true, the IME has to offer ways to invoke InputMethodManager#switchToNextInputMethod() accordingly.

Note that the system determines the most appropriate next input method and subtype in order to provide the consistent user experience in switching between IMEs and subtypes.

May be a boolean value, such as "true" or "false".

Public constructors

<init>

Added in API level 3
InputMethodInfo(
    context: Context!,
    service: ResolveInfo!)

Constructor.

Parameters
context Context!: The Context in which we are parsing the input method.
service ResolveInfo!: The ResolveInfo returned from the package manager about this input method's component.

<init>

Added in API level 3
InputMethodInfo(
    packageName: String!,
    className: String!,
    label: CharSequence!,
    settingsActivity: String!)

Temporary API for creating a built-in input method for test.

Public methods

describeContents

Added in API level 3
fun describeContents(): Int
Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

dump

Added in API level 3
fun dump(
    pw: Printer!,
    prefix: String!
): Unit

equals

Added in API level 3
fun equals(other: Any?): Boolean

Used to test whether the given parameter object is an InputMethodInfo and its Id is the same to this one.

Parameters
obj the reference object with which to compare.
Return
Boolean true if the given parameter object is an InputMethodInfo and its Id is the same to this one.

getComponent

Added in API level 3
fun getComponent(): ComponentName!

Return the component of the service that implements this input method.

getId

Added in API level 3
fun getId(): String!

Return a unique ID for this input method. The ID is generated from the package and class name implementing the method.

getIsDefaultResourceId

Added in API level 3
fun getIsDefaultResourceId(): Int

Return the resource identifier of a resource inside of this input method's .apk that determines whether it should be considered a default input method for the system.

getPackageName

Added in API level 3
fun getPackageName(): String!

Return the .apk package that implements this input method.

getServiceInfo

Added in API level 3
fun getServiceInfo(): ServiceInfo!

Return the raw information about the Service implementing this input method. Do not modify the returned object.

getServiceName

Added in API level 3
fun getServiceName(): String!

Return the class name of the service component that implements this input method.

getSettingsActivity

Added in API level 3
fun getSettingsActivity(): String!

Return the class name of an activity that provides a settings UI for the input method. You can launch this activity be starting it with an android.content.Intent whose action is MAIN and with an explicit android.content.ComponentName composed of getPackageName and the class name returned here.

A null will be returned if there is no settings activity associated with the input method.

getSubtypeAt

Added in API level 11
fun getSubtypeAt(index: Int): InputMethodSubtype!

Return the Input Method's subtype at the specified index.

Parameters
index Int: the index of the subtype to return.

getSubtypeCount

Added in API level 11
fun getSubtypeCount(): Int

Return the count of the subtypes of Input Method.

hashCode

Added in API level 3
fun hashCode(): Int
Return
Int a hash code value for this object.

loadIcon

Added in API level 3
fun loadIcon(pm: PackageManager!): Drawable!

Load the user-displayed icon for this input method.

Parameters
pm PackageManager!: Supply a PackageManager used to load the input method's resources.

loadLabel

Added in API level 3
fun loadLabel(pm: PackageManager!): CharSequence!

Load the user-displayed label for this input method.

Parameters
pm PackageManager!: Supply a PackageManager used to load the input method's resources.

toString

Added in API level 3
fun toString(): String
Return
String a string representation of the object.

writeToParcel

Added in API level 3
fun writeToParcel(
    dest: Parcel!,
    flags: Int
): Unit

Used to package this object into a Parcel.

Parameters
dest Parcel!: The Parcel to be written.
flags Int: The flags used for parceling.

Properties

CREATOR

Added in API level 3
static val CREATOR: Parcelable.Creator<InputMethodInfo!>

Used to make this class parcelable.