FileDocCategorySizeDatePackage
ExtractedText.javaAPI DocAndroid 5.1 API4308Thu Mar 12 22:22:10 GMT 2015android.view.inputmethod

ExtractedText

public class ExtractedText extends Object implements android.os.Parcelable
Information about text that has been extracted for use by an input method. This contains information about a portion of the currently edited text, that the IME should display into its own interface while in extracted mode.

Fields Summary
public CharSequence
text
The text that has been extracted.
public int
startOffset
The offset in the overall text at which the extracted text starts.
public int
partialStartOffset
If the content is a report of a partial text change, this is the offset where the change starts and it runs until {@link #partialEndOffset}. If the content is the full text, this field is -1.
public int
partialEndOffset
If the content is a report of a partial text change, this is the offset where the change ends. Note that the actual text may be larger or smaller than the difference between this and {@link #partialStartOffset}, meaning a reduction or increase, respectively, in the total text.
public int
selectionStart
The offset where the selection currently starts within the extracted text. The real selection start position is at startOffset+selectionStart.
public int
selectionEnd
The offset where the selection currently ends within the extracted text. The real selection end position is at startOffset+selectionEnd.
public static final int
FLAG_SINGLE_LINE
Bit for {@link #flags}: set if the text being edited can only be on a single line.
public static final int
FLAG_SELECTING
Bit for {@link #flags}: set if the editor is currently in selection mode. This happens when a hardware keyboard with latched keys is attached and the shift key is currently latched.
public int
flags
Additional bit flags of information about the edited text.
public static final Parcelable.Creator
CREATOR
Used to make this class parcelable.
Constructors Summary
Methods Summary
public intdescribeContents()


       
        return 0;
    
public voidwriteToParcel(android.os.Parcel dest, int flags)
Used to package this object into a {@link Parcel}.

param
dest The {@link Parcel} to be written.
param
flags The flags used for parceling.


                                 
          
        TextUtils.writeToParcel(text, dest, flags);
        dest.writeInt(startOffset);
        dest.writeInt(partialStartOffset);
        dest.writeInt(partialEndOffset);
        dest.writeInt(selectionStart);
        dest.writeInt(selectionEnd);
        dest.writeInt(this.flags);