public final class

ContentInfoCompat.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.core.view.ContentInfoCompat.Builder

Overview

Builder for ContentInfoCompat.

Summary

Constructors
publicBuilder(ClipData clip, int source)

Creates a new builder.

publicBuilder(ContentInfoCompat other)

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

Methods
public ContentInfoCompatbuild()

public ContentInfoCompat.BuildersetClip(ClipData clip)

Sets the data to be inserted.

public ContentInfoCompat.BuildersetExtras(Bundle extras)

Sets additional metadata.

public ContentInfoCompat.BuildersetFlags(int flags)

Sets flags that control content insertion behavior.

public ContentInfoCompat.BuildersetLinkUri(Uri linkUri)

Sets the http/https URI for the content.

public ContentInfoCompat.BuildersetSource(int source)

Sets the source of the operation.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder(ContentInfoCompat other)

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

public Builder(ClipData clip, int source)

Creates a new builder.

Parameters:

clip: The data to insert.
source: The source of the operation. See SOURCE_ constants.

Methods

public ContentInfoCompat.Builder setClip(ClipData clip)

Sets the data to be inserted.

Parameters:

clip: The data to insert.

Returns:

this builder

public ContentInfoCompat.Builder setSource(int source)

Sets the source of the operation.

Parameters:

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

Returns:

this builder

public ContentInfoCompat.Builder setFlags(int flags)

Sets flags that control content insertion behavior.

Parameters:

flags: Optional flags to configure the insertion behavior. Use 0 for default behavior. See FLAG_ constants.

Returns:

this builder

public ContentInfoCompat.Builder setLinkUri(Uri linkUri)

Sets the http/https URI for the content. See for more info.

Parameters:

linkUri: Optional http/https URI for the content.

Returns:

this builder

public ContentInfoCompat.Builder setExtras(Bundle extras)

Sets additional metadata.

Parameters:

extras: Optional bundle with additional metadata.

Returns:

this builder

public ContentInfoCompat build()

Returns:

A new ContentInfoCompat instance with the data from this builder.