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

public ClipData.Item build ()

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

Returns
ClipData.Item This value cannot be null.

setHtmlText

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

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

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

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

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.