# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Constants | Inherited Constants | Fields | Ctors | Methods | Inherited Methods

# SuggestionsInfo

`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

## Summary

### Constants
`int` | `RESULT_ATTR_DONT_SHOW_UI_FOR_SUGGESTIONS` Flag of the attributes of the suggestions that can be obtained by `getSuggestionsAttributes()`: this tells that the text service has an alternative way to show UI for the list of correction suggestions to the user.
`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.
`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.
`int` | `RESULT_ATTR_LOOKS_LIKE_GRAMMAR_ERROR` Flag of the attributes of the suggestions that can be obtained by `getSuggestionsAttributes()`: this tells that the text service thinks the requested sentence contains a grammar error.
`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.

### Inherited constants
From interface `android.os.Parcelable`
`int` | `CONTENTS_FILE_DESCRIPTOR` Descriptor bit used with `describeContents()`: indicates that the Parcelable object's flattened representation includes a file descriptor.
`int` | `PARCELABLE_WRITE_RETURN_VALUE` Flag for use with `writeToParcel(Parcel, int)`: the object being written is a return value, that is the result of a function such as "`Parcelable someFunction()`", "`void someFunction(out Parcelable)`", or "`void someFunction(inout 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 `Parcel`.

### 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 timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.
From interface `android.os.Parcelable`
`abstract int` | `describeContents()` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.
`abstract void` | `writeToParcel(Parcel dest, int flags)` Flatten this object in to a Parcel.

## Constants

### RESULT_ATTR_DONT_SHOW_UI_FOR_SUGGESTIONS

    public static final int RESULT_ATTR_DONT_SHOW_UI_FOR_SUGGESTIONS

Flag of the attributes of the suggestions that can be obtained by `getSuggestionsAttributes()`: this tells that the text service has an alternative way to show UI for the list of correction suggestions to the user. When this flag is set, the receiver of the result suggestions should mark the erroneous part of the text with a text signifier (for example, underline), but should not show any UI for the list of correction suggestions to the user (for example, in a popup window).

Constant Value: 16 (0x00000010)

### RESULT_ATTR_HAS_RECOMMENDED_SUGGESTIONS

    public static final 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)

### RESULT_ATTR_IN_THE_DICTIONARY

    public static final 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)

### RESULT_ATTR_LOOKS_LIKE_GRAMMAR_ERROR

    public static final int RESULT_ATTR_LOOKS_LIKE_GRAMMAR_ERROR

Flag of the attributes of the suggestions that can be obtained by `getSuggestionsAttributes()`: this tells that the text service thinks the requested sentence contains a grammar error.

Constant Value: 8 (0x00000008)

### RESULT_ATTR_LOOKS_LIKE_TYPO

    public static final 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)

## Fields

### CREATOR

    public static final Creator<SuggestionsInfo> CREATOR

Used to make this class parcelable.

## Public constructors

### SuggestionsInfo

    public SuggestionsInfo (int suggestionsAttributes,
                    String[] suggestions)

Constructor.

Parameters
`suggestionsAttributes` | `int`: from the text service
`suggestions` | `String`: from the text service

### SuggestionsInfo

    public SuggestionsInfo (int suggestionsAttributes,
                    String[] suggestions,
                    int cookie,
                    int sequence)

Constructor.

Parameters
`suggestionsAttributes` | `int`: from the text service Value is either `0` or a combination of `RESULT_ATTR_IN_THE_DICTIONARY`, `RESULT_ATTR_LOOKS_LIKE_TYPO`, `RESULT_ATTR_HAS_RECOMMENDED_SUGGESTIONS`, `RESULT_ATTR_LOOKS_LIKE_GRAMMAR_ERROR`, and `RESULT_ATTR_DONT_SHOW_UI_FOR_SUGGESTIONS`
`suggestions` | `String`: from the text service
`cookie` | `int`: the cookie of the input TextInfo
`sequence` | `int`: the cookie of the input TextInfo

### SuggestionsInfo

    public SuggestionsInfo (Parcel source)

Parameters
`source` | `Parcel`

## Public methods

### describeContents

    public 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. Value is either `0` or `CONTENTS_FILE_DESCRIPTOR`

### getCookie

    public int getCookie ()

Returns
`int` | the cookie which may be set by a client application

### getSequence

    public int getSequence ()

Returns
`int` | the sequence which may be set by a client application

### getSuggestionAt

    public String getSuggestionAt (int i)

Parameters
`i` | `int`: the id of suggestions

Returns
`String` | the suggestion at the specified id

### getSuggestionsAttributes

    public 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. Value is either `0` or a combination of `RESULT_ATTR_IN_THE_DICTIONARY`, `RESULT_ATTR_LOOKS_LIKE_TYPO`, `RESULT_ATTR_HAS_RECOMMENDED_SUGGESTIONS`, `RESULT_ATTR_LOOKS_LIKE_GRAMMAR_ERROR`, and `RESULT_ATTR_DONT_SHOW_UI_FOR_SUGGESTIONS`

### getSuggestionsCount

    public 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.

### setCookieAndSequence

    public 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

### writeToParcel

    public 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.

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*