Added in API level 11

CorrectionInfo


class CorrectionInfo : Parcelable
kotlin.Any
   ↳ android.view.inputmethod.CorrectionInfo

Information about a single text correction that an editor has reported to an input method.

Summary

Inherited constants
Public constructors
CorrectionInfo(offset: Int, oldText: CharSequence!, newText: CharSequence!)

Public methods
Int

CharSequence!

Return the new text that corrects what was typed by the user.

Int

Return the offset position of this correction in the text.

CharSequence!

Return the text that has actually been typed by the user, and which has been corrected.

String

Unit
writeToParcel(dest: Parcel, flags: Int)

Used to package this object into a Parcel.

Properties
static Parcelable.Creator<CorrectionInfo!>

Used to make this class parcelable.

Public constructors

CorrectionInfo

Added in API level 11
CorrectionInfo(
    offset: Int,
    oldText: CharSequence!,
    newText: CharSequence!)
Parameters
offset Int: The offset in the edited text where the old and new text start.
oldText CharSequence!: The old text that has been replaced.
newText CharSequence!: The replacement text.

Public methods

describeContents

Added in API level 11
fun describeContents(): Int
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

getNewText

Added in API level 11
fun getNewText(): CharSequence!

Return the new text that corrects what was typed by the user.

getOffset

Added in API level 11
fun getOffset(): Int

Return the offset position of this correction in the text. Both the getOldText() and getNewText() start at this offset.

getOldText

Added in API level 11
fun getOldText(): CharSequence!

Return the text that has actually been typed by the user, and which has been corrected.

toString

Added in API level 11
fun toString(): String
Return
String a string representation of the object.

writeToParcel

Added in API level 11
fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit

Used to package this object into a Parcel.

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

Properties

CREATOR

Added in API level 11
static val CREATOR: Parcelable.Creator<CorrectionInfo!>

Used to make this class parcelable.