ContentInfoCompat.Builder

Added in 1.5.0

class ContentInfoCompat.Builder


Builder for ContentInfoCompat.

Summary

Public constructors

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

Builder(clip: ClipData, source: Int)

Creates a new builder.

Public functions

ContentInfoCompat
ContentInfoCompat.Builder

Sets the data to be inserted.

ContentInfoCompat.Builder
setExtras(extras: Bundle?)

Sets additional metadata.

ContentInfoCompat.Builder
setFlags(flags: Int)

Sets flags that control content insertion behavior.

ContentInfoCompat.Builder
setLinkUri(linkUri: Uri?)

Sets the http/https URI for the content.

ContentInfoCompat.Builder
setSource(source: Int)

Sets the source of the operation.

Public constructors

Builder

Added in 1.5.0
Builder(other: ContentInfoCompat)

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

Builder

Added in 1.5.0
Builder(clip: ClipData, source: Int)

Creates a new builder.

Parameters
clip: ClipData

The data to insert.

source: Int

The source of the operation. See SOURCE_ constants.

Public functions

build

Added in 1.5.0
fun build(): ContentInfoCompat
Returns
ContentInfoCompat

A new ContentInfoCompat instance with the data from this builder.

setClip

Added in 1.5.0
fun setClip(clip: ClipData): ContentInfoCompat.Builder

Sets the data to be inserted.

Parameters
clip: ClipData

The data to insert.

Returns
ContentInfoCompat.Builder

this builder

setExtras

Added in 1.5.0
fun setExtras(extras: Bundle?): ContentInfoCompat.Builder

Sets additional metadata.

Parameters
extras: Bundle?

Optional bundle with additional metadata.

Returns
ContentInfoCompat.Builder

this builder

setFlags

Added in 1.5.0
fun setFlags(flags: Int): ContentInfoCompat.Builder

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

Added in 1.5.0
fun setLinkUri(linkUri: Uri?): ContentInfoCompat.Builder

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

Parameters
linkUri: Uri?

Optional http/https URI for the content.

Returns
ContentInfoCompat.Builder

this builder

setSource

Added in 1.5.0
fun setSource(source: Int): ContentInfoCompat.Builder

Sets the source of the operation.

Parameters
source: Int

The source of the operation. See SOURCE_ constants.

Returns
ContentInfoCompat.Builder

this builder