Added in API level 31

ContentInfo


class ContentInfo : Parcelable
kotlin.Any
   ↳ android.view.ContentInfo

Holds all the relevant data for a request to View#performReceiveContent.

Summary

Nested classes

Builder for ContentInfo.

Constants
static Int

Flag requesting that the content should be converted to plain text prior to inserting.

static Int

Specifies that the operation was triggered by the app that contains the target view.

static Int

Specifies that the operation was triggered by the autofill framework.

static Int

Specifies that the operation was triggered by a paste from the clipboard (e.g. "Paste" or "Paste as plain text" action in the insertion/selection menu).

static Int

Specifies that the operation was triggered by the drag/drop framework.

static Int

Specifies that the operation was triggered from the soft keyboard (also known as input method editor or IME).

static Int

Specifies that the operation was triggered by a result from a PROCESS_TEXT action in the selection menu.

Inherited constants
Public methods
Int

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

ClipData

The data to be inserted.

Bundle?

Optional additional metadata.

Int

Optional flags that control the insertion behavior.

Uri?

Optional http/https URI for the content that may be provided by the IME.

Int

The source of the operation.

String

Returns a string representation of the object.

Unit
writeToParcel(dest: Parcel, flags: Int)

Writes this object into the given parcel.

Properties
static Parcelable.Creator<ContentInfo!>

Creates ContentInfo instances from parcels.

Constants

FLAG_CONVERT_TO_PLAIN_TEXT

Added in API level 31
static val FLAG_CONVERT_TO_PLAIN_TEXT: Int

Flag requesting that the content should be converted to plain text prior to inserting.

Value: 1

SOURCE_APP

Added in API level 31
static val SOURCE_APP: Int

Specifies that the operation was triggered by the app that contains the target view.

Value: 0

SOURCE_AUTOFILL

Added in API level 31
static val SOURCE_AUTOFILL: Int

Specifies that the operation was triggered by the autofill framework. See https://developer.android.com/guide/topics/text/autofill for more info.

Value: 4

SOURCE_CLIPBOARD

Added in API level 31
static val SOURCE_CLIPBOARD: Int

Specifies that the operation was triggered by a paste from the clipboard (e.g. "Paste" or "Paste as plain text" action in the insertion/selection menu).

Value: 1

SOURCE_DRAG_AND_DROP

Added in API level 31
static val SOURCE_DRAG_AND_DROP: Int

Specifies that the operation was triggered by the drag/drop framework. See https://developer.android.com/guide/topics/ui/drag-drop for more info.

Value: 3

SOURCE_INPUT_METHOD

Added in API level 31
static val SOURCE_INPUT_METHOD: Int

Specifies that the operation was triggered from the soft keyboard (also known as input method editor or IME). See https://developer.android.com/guide/topics/text/image-keyboard for more info.

Value: 2

SOURCE_PROCESS_TEXT

Added in API level 31
static val SOURCE_PROCESS_TEXT: Int

Specifies that the operation was triggered by a result from a PROCESS_TEXT action in the selection menu.

Value: 5

Public methods

describeContents

Added in API level 31
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 android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

getClip

Added in API level 31
fun getClip(): ClipData

The data to be inserted.

Return
ClipData This value cannot be null.

getExtras

Added in API level 31
fun getExtras(): Bundle?

Optional additional metadata. If the source is SOURCE_INPUT_METHOD, this will include the opts passed by the IME.

Return
Bundle? This value may be null.

getFlags

Added in API level 31
fun getFlags(): Int

Optional flags that control the insertion behavior. See FLAG_ constants.

Return
Int Value is either 0 or android.view.ContentInfo#FLAG_CONVERT_TO_PLAIN_TEXT

getLinkUri

Added in API level 31
fun getLinkUri(): Uri?

Optional http/https URI for the content that may be provided by the IME. This is only populated if the source is SOURCE_INPUT_METHOD and if a non-empty linkUri was passed by the IME.

Return
Uri? This value may be null.

toString

Added in API level 31
fun toString(): String

Returns a string representation of the object.

Return
String This value cannot be null.

writeToParcel

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

Writes this object into the given parcel.

Parameters
dest Parcel: The parcel to write into. This value cannot be null.
flags Int: The flags to use for parceling.

Properties

CREATOR

Added in API level 31
static val CREATOR: Parcelable.Creator<ContentInfo!>

Creates ContentInfo instances from parcels.