public final class SuggestionsInfo extends Object implements Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<SuggestionsInfo> |
CREATOR
Used to make this class parcelable.
|
static int |
RESULT_ATTR_HAS_RECOMMENDED_SUGGESTIONS
Flag of the attributes of the suggestions that can be obtained by
getSuggestionsAttributes() : this tells that the text service thinks
the result suggestions include highly recommended ones. |
static int |
RESULT_ATTR_IN_THE_DICTIONARY
Flag of the attributes of the suggestions that can be obtained by
getSuggestionsAttributes() : this tells that the requested word was found
in the dictionary in the text service. |
static int |
RESULT_ATTR_LOOKS_LIKE_TYPO
Flag of the attributes of the suggestions that can be obtained by
getSuggestionsAttributes() : this tells that the text service thinks the requested
word looks like a typo. |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
SuggestionsInfo(int suggestionsAttributes,
String[] suggestions)
Constructor.
|
SuggestionsInfo(int suggestionsAttributes,
String[] suggestions,
int cookie,
int sequence)
Constructor.
|
SuggestionsInfo(Parcel source) |
Modifier and Type | Method and Description |
---|---|
int |
describeContents()
Used to make this class parcelable.
|
int |
getCookie() |
int |
getSequence() |
String |
getSuggestionAt(int i) |
int |
getSuggestionsAttributes() |
int |
getSuggestionsCount() |
void |
setCookieAndSequence(int cookie,
int sequence)
Set the cookie and the sequence of SuggestionsInfo which are set to TextInfo from a client
application
|
void |
writeToParcel(Parcel dest,
int flags)
Used to package this object into a
Parcel . |
public static final int RESULT_ATTR_IN_THE_DICTIONARY
getSuggestionsAttributes()
: this tells that the requested word was found
in the dictionary in the text service.public static final int RESULT_ATTR_LOOKS_LIKE_TYPO
getSuggestionsAttributes()
: this tells that the text service thinks the requested
word looks like a typo.public static final int RESULT_ATTR_HAS_RECOMMENDED_SUGGESTIONS
getSuggestionsAttributes()
: this tells that the text service thinks
the result suggestions include highly recommended ones.public static final Parcelable.Creator<SuggestionsInfo> CREATOR
public SuggestionsInfo(int suggestionsAttributes, String[] suggestions)
suggestionsAttributes
- from the text servicesuggestions
- from the text servicepublic SuggestionsInfo(int suggestionsAttributes, String[] suggestions, int cookie, int sequence)
suggestionsAttributes
- from the text servicesuggestions
- from the text servicecookie
- the cookie of the input TextInfosequence
- the cookie of the input TextInfopublic SuggestionsInfo(Parcel source)
public void writeToParcel(Parcel dest, int flags)
Parcel
.writeToParcel
in interface Parcelable
dest
- The Parcel
to be written.flags
- The flags used for parceling.public void setCookieAndSequence(int cookie, int sequence)
cookie
- the cookie of an input TextInfosequence
- the cookie of an input TextInfopublic int getCookie()
public int getSequence()
public int getSuggestionsAttributes()
public int getSuggestionsCount()
public String getSuggestionAt(int i)
i
- the id of suggestionspublic int describeContents()
describeContents
in interface Parcelable