ContentInfo.Builder
public
static
final
class
ContentInfo.Builder
extends Object
| java.lang.Object | |
| ↳ | android.view.ContentInfo.Builder |
Builder for ContentInfo.
Summary
Public constructors | |
|---|---|
Builder(ClipData clip, int source)
Creates a new builder. |
|
Builder(ContentInfo other)
Creates a new builder initialized with the data from the given builder. |
|
Public methods | |
|---|---|
ContentInfo
|
build()
|
ContentInfo.Builder
|
setClip(ClipData clip)
Sets the data to be inserted. |
ContentInfo.Builder
|
setExtras(Bundle extras)
Sets additional metadata. |
ContentInfo.Builder
|
setFlags(int flags)
Sets flags that control content insertion behavior. |
ContentInfo.Builder
|
setLinkUri(Uri linkUri)
Sets the http/https URI for the content. |
ContentInfo.Builder
|
setSource(int source)
Sets the source of the operation. |
Inherited methods | |
|---|---|
Public constructors
Builder
public Builder (ClipData clip, int source)
Creates a new builder.
| Parameters | |
|---|---|
clip |
ClipData: The data to insert.
This value cannot be null. |
source |
int: The source of the operation. See SOURCE_ constants.
Value is one of the following: |
Builder
public Builder (ContentInfo other)
Creates a new builder initialized with the data from the given builder.
| Parameters | |
|---|---|
other |
ContentInfo: This value cannot be null. |
Public methods
build
public ContentInfo build ()
| Returns | |
|---|---|
ContentInfo |
A new ContentInfo instance with the data from this builder.
This value cannot be null. |
setClip
public ContentInfo.Builder setClip (ClipData clip)
Sets the data to be inserted.
| Parameters | |
|---|---|
clip |
ClipData: The data to insert.
This value cannot be null. |
| Returns | |
|---|---|
ContentInfo.Builder |
this builder.
This value cannot be null. |
setExtras
public ContentInfo.Builder setExtras (Bundle extras)
Sets additional metadata.
| Parameters | |
|---|---|
extras |
Bundle: Optional bundle with additional metadata.
This value may be null. |
| Returns | |
|---|---|
ContentInfo.Builder |
this builder.
This value cannot be null. |
setFlags
public ContentInfo.Builder setFlags (int flags)
Sets flags that control content insertion behavior.
| Parameters | |
|---|---|
flags |
int: Optional flags to configure the insertion behavior. Use 0 for default
behavior. See FLAG_ constants.
Value is either 0 or
|
| Returns | |
|---|---|
ContentInfo.Builder |
this builder.
This value cannot be null. |
setLinkUri
public ContentInfo.Builder setLinkUri (Uri linkUri)
Sets the http/https URI for the content. See
InputContentInfo.getLinkUri() for more info.
| Parameters | |
|---|---|
linkUri |
Uri: Optional http/https URI for the content.
This value may be null. |
| Returns | |
|---|---|
ContentInfo.Builder |
this builder.
This value cannot be null. |
setSource
public ContentInfo.Builder setSource (int source)
Sets the source of the operation.
| Parameters | |
|---|---|
source |
int: The source of the operation. See SOURCE_ constants.
Value is one of the following: |
| Returns | |
|---|---|
ContentInfo.Builder |
this builder.
This value cannot be null. |