Skip to content

Most visited

Recently visited

navigation
Added in API level 14

SpellCheckerSubtype

public final class SpellCheckerSubtype
extends Object implements Parcelable

java.lang.Object
   ↳ android.view.textservice.SpellCheckerSubtype


This class is used to specify meta information of a subtype contained in a spell checker. Subtype can describe locale (e.g. en_US, fr_FR...) used for settings.

Summary

Inherited constants

From interface android.os.Parcelable

Fields

public static final Creator<SpellCheckerSubtype> CREATOR

Public constructors

SpellCheckerSubtype(int nameId, String locale, String extraValue)

Constructor

Public methods

boolean containsExtraValueKey(String key)

The string of ExtraValue in subtype should be defined as follows: example: key0,key1=value1,key2,key3,key4=value4

int describeContents()

Describe the kinds of special objects contained in this Parcelable's marshalled representation.

boolean equals(Object o)

Compares this instance with the specified object and indicates if they are equal.

CharSequence getDisplayName(Context context, String packageName, ApplicationInfo appInfo)
String getExtraValue()
String getExtraValueOf(String key)

The string of ExtraValue in subtype should be defined as follows: example: key0,key1=value1,key2,key3,key4=value4

String getLocale()
int getNameResId()
int hashCode()

Returns an integer hash code for this object.

void writeToParcel(Parcel dest, int parcelableFlags)

Flatten this object in to a Parcel.

Inherited methods

From class java.lang.Object
From interface android.os.Parcelable

Fields

CREATOR

Added in API level 14
Creator<SpellCheckerSubtype> CREATOR

Public constructors

SpellCheckerSubtype

Added in API level 14
SpellCheckerSubtype (int nameId, 
                String locale, 
                String extraValue)

Constructor

Parameters
nameId int: The name of the subtype
locale String: The locale supported by the subtype
extraValue String: The extra value of the subtype

Public methods

containsExtraValueKey

Added in API level 16
boolean containsExtraValueKey (String key)

The string of ExtraValue in subtype should be defined as follows: example: key0,key1=value1,key2,key3,key4=value4

Parameters
key String: the key of extra value
Returns
boolean the subtype contains specified the extra value

describeContents

Added in API level 14
int describeContents ()

Describe the kinds of special objects contained in this Parcelable's marshalled representation.

Returns
int a bitmask indicating the set of special object types marshalled by the Parcelable.

equals

Added in API level 14
boolean equals (Object o)

Compares this instance with the specified object and indicates if they are equal. In order to be equal, o must represent the same object as this instance using a class-specific comparison. The general contract is that this comparison should be reflexive, symmetric, and transitive. Also, no object reference other than null is equal to null.

The default implementation returns true only if this == o. See Writing a correct equals method if you intend implementing your own equals method.

The general contract for the equals and hashCode() methods is that if equals returns true for any two objects, then hashCode() must return the same value for these objects. This means that subclasses of Object usually override either both methods or neither of them.

Parameters
o Object: the object to compare this instance with.
Returns
boolean true if the specified object is equal to this Object; false otherwise.

getDisplayName

Added in API level 14
CharSequence getDisplayName (Context context, 
                String packageName, 
                ApplicationInfo appInfo)

Parameters
context Context: Context will be used for getting Locale and PackageManager.
packageName String: The package name of the spell checker
appInfo ApplicationInfo: The application info of the spell checker
Returns
CharSequence a display name for this subtype. The string resource of the label (mSubtypeNameResId) can have only one %s in it. If there is, the %s part will be replaced with the locale's display name by the formatter. If there is not, this method simply returns the string specified by mSubtypeNameResId. If mSubtypeNameResId is not specified (== 0), it's up to the framework to generate an appropriate display name.

getExtraValue

Added in API level 14
String getExtraValue ()

Returns
String the extra value of the subtype

getExtraValueOf

Added in API level 16
String getExtraValueOf (String key)

The string of ExtraValue in subtype should be defined as follows: example: key0,key1=value1,key2,key3,key4=value4

Parameters
key String: the key of extra value
Returns
String the value of the specified key

getLocale

Added in API level 14
String getLocale ()

Returns
String the locale of the subtype

getNameResId

Added in API level 14
int getNameResId ()

Returns
int the name of the subtype

hashCode

Added in API level 14
int hashCode ()

Returns an integer hash code for this object. By contract, any two objects for which equals(Object) returns true must return the same hash code value. This means that subclasses of Object usually override both methods or neither method.

Note that hash values must not change over time unless information used in equals comparisons also changes.

See Writing a correct hashCode method if you intend implementing your own hashCode method.

Returns
int this object's hash code.

writeToParcel

Added in API level 14
void writeToParcel (Parcel dest, 
                int parcelableFlags)

Flatten this object in to a Parcel.

Parameters
dest Parcel: The Parcel in which the object should be written.
parcelableFlags int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.