ExtractedText

open class ExtractedText : Parcelable
kotlin.Any
   ↳ android.view.inputmethod.ExtractedText

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.
Requires API level 3 (Android 1.5, Cupcake)

Summary

Constants
static Int

Bit for #flags: set if the editor is currently in selection mode.

static Int

Bit for #flags: set if the text being edited can only be on a single line.

Inherited constants
Public constructors

Public methods
open Unit
writeToParcel(dest: Parcel!, flags: Int)

Used to package this object into a Parcel.

open Int

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

Properties
Int

Additional bit flags of information about the edited text.

CharSequence!

The hint that has been extracted.

Int

If the content is a report of a partial text change, this is the offset where the change ends.

Int

If the content is a report of a partial text change, this is the offset where the change starts and it runs until #partialEndOffset.

Int

The offset where the selection currently ends within the extracted text.

Int

The offset where the selection currently starts within the extracted text.

Int

The offset in the overall text at which the extracted text starts.

CharSequence!

The text that has been extracted.

static Parcelable.Creator<ExtractedText!>!

Used to make this class parcelable.

Constants

FLAG_SELECTING

added in API level 3
static val FLAG_SELECTING: Int

Bit for #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.
Requires API level 3 (Android 1.5, Cupcake)

Value: 2

FLAG_SINGLE_LINE

added in API level 3
static val FLAG_SINGLE_LINE: Int

Bit for #flags: set if the text being edited can only be on a single line.
Requires API level 3 (Android 1.5, Cupcake)

Value: 1

Public constructors

<init>

ExtractedText()

Public methods

writeToParcel

added in API level 3
open fun writeToParcel(dest: Parcel!, flags: Int): Unit

Used to package this object into a Parcel.
Requires API level 3 (Android 1.5, Cupcake)

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

describeContents

added in API level 3
open fun describeContents(): Int

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of #writeToParcel(Parcel, int), the return value of this method must include the #CONTENTS_FILE_DESCRIPTOR bit. Requires API level 3 (Android 1.5, Cupcake)

Return
Int: a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

Properties

flags

added in API level 3
var flags: Int

Additional bit flags of information about the edited text.
Requires API level 3 (Android 1.5, Cupcake)

hint

added in API level 28
var hint: CharSequence!

The hint that has been extracted.
Requires API level 28 (Android 8.+, P)

partialEndOffset

added in API level 3
var partialEndOffset: Int

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 #partialStartOffset, meaning a reduction or increase, respectively, in the total text.
Requires API level 3 (Android 1.5, Cupcake)

partialStartOffset

added in API level 3
var partialStartOffset: Int

If the content is a report of a partial text change, this is the offset where the change starts and it runs until #partialEndOffset. If the content is the full text, this field is -1.
Requires API level 3 (Android 1.5, Cupcake)

selectionEnd

added in API level 3
var selectionEnd: Int

The offset where the selection currently ends within the extracted text. The real selection end position is at startOffset+selectionEnd.
Requires API level 3 (Android 1.5, Cupcake)

selectionStart

added in API level 3
var selectionStart: Int

The offset where the selection currently starts within the extracted text. The real selection start position is at startOffset+selectionStart.
Requires API level 3 (Android 1.5, Cupcake)

startOffset

added in API level 3
var startOffset: Int

The offset in the overall text at which the extracted text starts.
Requires API level 3 (Android 1.5, Cupcake)

text

added in API level 3
var text: CharSequence!

The text that has been extracted.
Requires API level 3 (Android 1.5, Cupcake)

CREATOR

added in API level 3
static val CREATOR: Parcelable.Creator<ExtractedText!>!

Used to make this class parcelable.
Requires API level 3 (Android 1.5, Cupcake)