ContentInfoCompat.Builder

public static final class ContentInfoCompat.Builder
extends Object

java.lang.Object
   ↳ androidx.core.view.ContentInfoCompat.Builder


Builder for ContentInfoCompat.

Summary

Public constructors

Builder(ContentInfoCompat other)

Creates a new builder initialized with the data from the given object (shallow copy).

Builder(ClipData clip, int source)

Creates a new builder.

Public methods

ContentInfoCompat build()
ContentInfoCompat.Builder setClip(ClipData clip)

Sets the data to be inserted.

ContentInfoCompat.Builder setExtras(Bundle extras)

Sets additional metadata.

ContentInfoCompat.Builder setFlags(int flags)

Sets flags that control content insertion behavior.

ContentInfoCompat.Builder setLinkUri(Uri linkUri)

Sets the http/https URI for the content.

ContentInfoCompat.Builder setSource(int source)

Sets the source of the operation.

Inherited methods

Public constructors

Builder

public Builder (ContentInfoCompat other)

Creates a new builder initialized with the data from the given object (shallow copy).

Parameters
other ContentInfoCompat

Builder

public Builder (ClipData clip, 
                int source)

Creates a new builder.

Parameters
clip ClipData: The data to insert.

source int: The source of the operation. See SOURCE_ constants.

Public methods

build

public ContentInfoCompat build ()

Returns
ContentInfoCompat A new ContentInfoCompat instance with the data from this builder.

setClip

public ContentInfoCompat.Builder setClip (ClipData clip)

Sets the data to be inserted.

Parameters
clip ClipData: The data to insert.

Returns
ContentInfoCompat.Builder this builder

setExtras

public ContentInfoCompat.Builder setExtras (Bundle extras)

Sets additional metadata.

Parameters
extras Bundle: Optional bundle with additional metadata.

Returns
ContentInfoCompat.Builder this builder

setFlags

public ContentInfoCompat.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.

Returns
ContentInfoCompat.Builder this builder

setLinkUri

public ContentInfoCompat.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.

Returns
ContentInfoCompat.Builder this builder

setSource

public ContentInfoCompat.Builder setSource (int source)

Sets the source of the operation.

Parameters
source int: The source of the operation. See SOURCE_ constants.

Returns
ContentInfoCompat.Builder this builder