ClipData.Item.Builder


public static final class ClipData.Item.Builder
extends Object

java.lang.Object
   ↳ android.content.ClipData.Item.Builder


A builder for a ClipData Item.

Summary

Public constructors

Builder()

Public methods

ClipData.Item build()

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

ClipData.Item.Builder setHtmlText(String htmlText)

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 setText(CharSequence text)

Sets the text for the item to be constructed.

ClipData.Item.Builder setUri(Uri uri)

Sets the URI for the item to be constructed.

Inherited methods

Public constructors

Builder

public Builder ()

Public methods

build

Added in API level 35
public ClipData.Item build ()

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

Returns
ClipData.Item This value cannot be null.

setHtmlText

Added in API level 35
public ClipData.Item.Builder setHtmlText (String htmlText)

Sets the HTML text for the item to be constructed.

Parameters
htmlText String: This value may be null.

Returns
ClipData.Item.Builder This value cannot be null.

setIntent

Added in API level 35
public ClipData.Item.Builder setIntent (Intent intent)

Sets the Intent for the item to be constructed.

Parameters
intent Intent: This value may be null.

Returns
ClipData.Item.Builder This value cannot be null.

setIntentSender

Added in API level 35
public ClipData.Item.Builder setIntentSender (IntentSender intentSender)

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.

Returns
ClipData.Item.Builder This value cannot be null.

setText

Added in API level 35
public ClipData.Item.Builder setText (CharSequence text)

Sets the text for the item to be constructed.

Parameters
text CharSequence: This value may be null.

Returns
ClipData.Item.Builder This value cannot be null.

setUri

Added in API level 35
public ClipData.Item.Builder setUri (Uri uri)

Sets the URI for the item to be constructed.

Parameters
uri Uri: This value may be null.

Returns
ClipData.Item.Builder This value cannot be null.