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

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

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

Returns a string representation of the object.

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

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(android.os.Parcel,int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.

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

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

Returns a string representation of the object.

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.