Builder
class Builder
kotlin.Any | |
↳ | 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(htmlText: String?) Sets the HTML text for the item to be constructed. |
ClipData.Item.Builder |
Sets the Intent for the item to be constructed. |
ClipData.Item.Builder |
setIntentSender(intentSender: IntentSender?) Sets the |
ClipData.Item.Builder |
setText(text: CharSequence?) Sets the text for the item to be constructed. |
ClipData.Item.Builder |
Sets the URI for the item to be constructed. |
Public constructors
Builder
Builder()
Public methods
build
fun build(): ClipData.Item
Constructs a new Item with the properties set on this builder.
Return | |
---|---|
ClipData.Item |
This value cannot be null . |
setHtmlText
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
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
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
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
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 . |