public final class TextInfo extends Object implements Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<TextInfo> |
CREATOR
Used to make this class parcelable.
|
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_ELIDE_DUPLICATES, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
TextInfo(CharSequence charSequence,
int start,
int end,
int cookie,
int sequenceNumber)
Constructor.
|
TextInfo(Parcel source) |
TextInfo(String text)
Constructor.
|
TextInfo(String text,
int cookie,
int sequenceNumber)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
describeContents()
Used to make this class parcelable.
|
CharSequence |
getCharSequence() |
int |
getCookie() |
int |
getSequence() |
String |
getText() |
void |
writeToParcel(Parcel dest,
int flags)
Used to package this object into a
Parcel . |
public static final Parcelable.Creator<TextInfo> CREATOR
public TextInfo(String text)
text
- the text which will be input to TextServicepublic TextInfo(String text, int cookie, int sequenceNumber)
text
- the text which will be input to TextServicecookie
- the cookie for this TextInfosequenceNumber
- the sequence number for this TextInfopublic TextInfo(CharSequence charSequence, int start, int end, int cookie, int sequenceNumber)
charSequence
- the text which will be input to TextService. Attached spans that
implement ParcelableSpan
will also be marshaled alongside with the text.start
- the beginning of the range of text (inclusive).end
- the end of the range of text (exclusive).cookie
- the cookie for this TextInfosequenceNumber
- the sequence number for this TextInfopublic TextInfo(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 String getText()
public CharSequence getCharSequence()
public int getCookie()
public int getSequence()
public int describeContents()
describeContents
in interface Parcelable
Parcelable.CONTENTS_FILE_DESCRIPTOR