Added in API level 35

Builder


class Builder
kotlin.Any
   ↳ android.content.ClipData.Item.Builder

A builder for a ClipData Item.

Summary

Public constructors

Public methods
ClipData.Item

Constructs a new Item with the properties set on this builder.

ClipData.Item.Builder
setHtmlText(htmlText: String?)

Sets the HTML text for the item to be constructed.

ClipData.Item.Builder
setIntent(intent: Intent?)

Sets the Intent for the item to be constructed.

ClipData.Item.Builder
setIntentSender(intentSender: IntentSender?)

Sets the IntentSender for the item to be constructed.

ClipData.Item.Builder

Sets the text for the item to be constructed.

ClipData.Item.Builder
setUri(uri: Uri?)

Sets the URI for the item to be constructed.

Public constructors

Builder

Builder()

Public methods

build

Added in API level 35
fun build(): ClipData.Item

Constructs a new Item with the properties set on this builder.

Return
ClipData.Item This value cannot be null.

setHtmlText

Added in API level 35
fun setHtmlText(htmlText: String?): ClipData.Item.Builder

Sets the HTML text for the item to be constructed.

Parameters
htmlText String?: This value may be null.
Return
ClipData.Item.Builder This value cannot be null.

setIntent

Added in API level 35
fun setIntent(intent: Intent?): ClipData.Item.Builder

Sets the Intent for the item to be constructed.

Parameters
intent Intent?: This value may be null.
Return
ClipData.Item.Builder This value cannot be null.

setIntentSender

Added in API level 35
fun setIntentSender(intentSender: IntentSender?): ClipData.Item.Builder

Sets the IntentSender for the item to be constructed. To prevent receiving apps from improperly manipulating the intent to launch another activity as this caller, the provided IntentSender must be immutable. If there is a fixed lifetime for this ClipData (ie. for drag and drop), the system will cancel the IntentSender when it is no longer used.

Parameters
intentSender IntentSender?: This value may be null.
Return
ClipData.Item.Builder This value cannot be null.

setText

Added in API level 35
fun setText(text: CharSequence?): ClipData.Item.Builder

Sets the text for the item to be constructed.

Parameters
text CharSequence?: This value may be null.
Return
ClipData.Item.Builder This value cannot be null.

setUri

Added in API level 35
fun setUri(uri: Uri?): ClipData.Item.Builder

Sets the URI for the item to be constructed.

Parameters
uri Uri?: This value may be null.
Return
ClipData.Item.Builder This value cannot be null.