Android APIs
public final class

SentenceSuggestionsInfo

extends Object
implements Parcelable
java.lang.Object
   ↳ android.view.textservice.SentenceSuggestionsInfo

Class Overview

This class contains a metadata of suggestions returned from a text service (e.g. SpellCheckerService). The text service uses this class to return the suggestions for a sentence. See SuggestionsInfo which is used for suggestions for a word. This class extends the functionality of SuggestionsInfo as far as this class enables you to put multiple SuggestionsInfos on a sentence with the offsets and the lengths of all SuggestionsInfos.

Summary

[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<SentenceSuggestionsInfo> CREATOR Used to make this class parcelable.
Public Constructors
SentenceSuggestionsInfo(SuggestionsInfo[] suggestionsInfos, int[] offsets, int[] lengths)
Constructor.
SentenceSuggestionsInfo(Parcel source)
Public Methods
int describeContents()
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
int getLengthAt(int i)
int getOffsetAt(int i)
int getSuggestionsCount()
SuggestionsInfo getSuggestionsInfoAt(int i)
void writeToParcel(Parcel dest, int flags)
Used to package this object into a Parcel.
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Fields

public static final Creator<SentenceSuggestionsInfo> CREATOR

Added in API level 16

Used to make this class parcelable.

Public Constructors

public SentenceSuggestionsInfo (SuggestionsInfo[] suggestionsInfos, int[] offsets, int[] lengths)

Added in API level 16

Constructor.

Parameters
suggestionsInfos from the text service
offsets the array of offsets of suggestions
lengths the array of lengths of suggestions

public SentenceSuggestionsInfo (Parcel source)

Added in API level 16

Public Methods

public int describeContents ()

Added in API level 16

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

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

public int getLengthAt (int i)

Added in API level 16

Parameters
i the id of SuggestionsInfos this instance holds
Returns

public int getOffsetAt (int i)

Added in API level 16

Parameters
i the id of SuggestionsInfos this instance holds
Returns

public int getSuggestionsCount ()

Added in API level 16

Returns

public SuggestionsInfo getSuggestionsInfoAt (int i)

Added in API level 16

Parameters
i the id of SuggestionsInfos this instance holds.
Returns

public void writeToParcel (Parcel dest, int flags)

Added in API level 16

Used to package this object into a Parcel.

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