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 |
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 |
Inherited constants | |
---|---|
Public methods | |
---|---|
Int |
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
ClipData |
getClip() The data to be inserted. |
Bundle? |
Optional additional metadata. |
Int |
getFlags() 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 |
toString() 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 |
Constants
FLAG_CONVERT_TO_PLAIN_TEXT
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
static val SOURCE_APP: Int
Specifies that the operation was triggered by the app that contains the target view.
Value: 0
SOURCE_AUTOFILL
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
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
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
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
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
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
fun getClip(): ClipData
The data to be inserted.
Return | |
---|---|
ClipData |
This value cannot be null . |
getExtras
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
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
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 . |
getSource
fun getSource(): Int
The source of the operation. See SOURCE_
constants. Future versions of Android may pass additional values.
toString
fun toString(): String
Returns a string representation of the object.
Return | |
---|---|
String |
This value cannot be null . |
writeToParcel
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
static val CREATOR: Parcelable.Creator<ContentInfo!>
Creates ContentInfo
instances from parcels.