public
final
class
SuggestionsInfo
extends Object
implements
Parcelable
java.lang.Object | |
↳ | android.view.textservice.SuggestionsInfo |
This class contains a metadata of suggestions from the text service
Constants | |
---|---|
int |
RESULT_ATTR_HAS_RECOMMENDED_SUGGESTIONS
Flag of the attributes of the suggestions that can be obtained by
|
int |
RESULT_ATTR_IN_THE_DICTIONARY
Flag of the attributes of the suggestions that can be obtained by
|
int |
RESULT_ATTR_LOOKS_LIKE_TYPO
Flag of the attributes of the suggestions that can be obtained by
|
Inherited constants |
---|
From
interface
android.os.Parcelable
|
Fields | |
---|---|
public
static
final
Creator<SuggestionsInfo> |
CREATOR
Used to make this class parcelable. |
Public constructors | |
---|---|
SuggestionsInfo(int suggestionsAttributes, String[] suggestions)
Constructor. |
|
SuggestionsInfo(int suggestionsAttributes, String[] suggestions, int cookie, int sequence)
Constructor. |
|
SuggestionsInfo(Parcel source)
|
Public methods | |
---|---|
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 |
Inherited methods | |
---|---|
From
class
java.lang.Object
| |
From
interface
android.os.Parcelable
|
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.
Constant Value: 4 (0x00000004)
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.
Constant Value: 1 (0x00000001)
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.
Constant Value: 2 (0x00000002)
SuggestionsInfo (int suggestionsAttributes, String[] suggestions)
Constructor.
Parameters | |
---|---|
suggestionsAttributes |
int :
from the text service |
suggestions |
String :
from the text service
|
SuggestionsInfo (int suggestionsAttributes, String[] suggestions, int cookie, int sequence)
Constructor.
Parameters | |
---|---|
suggestionsAttributes |
int :
from the text service |
suggestions |
String :
from the text service |
cookie |
int :
the cookie of the input TextInfo |
sequence |
int :
the cookie of the input TextInfo
|
int describeContents ()
Used to make this class parcelable.
Returns | |
---|---|
int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. |
int getCookie ()
Returns | |
---|---|
int |
the cookie which may be set by a client application |
int getSequence ()
Returns | |
---|---|
int |
the sequence which may be set by a client application |
String getSuggestionAt (int i)
Parameters | |
---|---|
i |
int :
the id of suggestions |
Returns | |
---|---|
String |
the suggestion at the specified id |
int getSuggestionsAttributes ()
Returns | |
---|---|
int |
the attributes of suggestions. This includes whether the spell checker has the word in its dictionary or not and whether the spell checker has confident suggestions for the word or not. |
int getSuggestionsCount ()
Returns | |
---|---|
int |
the count of the suggestions. If there's no suggestions at all, this method returns -1. Even if this method returns 0, it doesn't necessarily mean that there are no suggestions for the requested word. For instance, the caller could have been asked to limit the maximum number of suggestions returned. |
void setCookieAndSequence (int cookie, int sequence)
Set the cookie and the sequence of SuggestionsInfo which are set to TextInfo from a client application
Parameters | |
---|---|
cookie |
int :
the cookie of an input TextInfo |
sequence |
int :
the cookie of an input TextInfo
|
void writeToParcel (Parcel dest, int flags)
Used to package this object into a Parcel
.
Parameters | |
---|---|
dest |
Parcel :
The Parcel to be written. |
flags |
int :
The flags used for parceling.
|