Added in API level 37

Builder


class Builder
kotlin.Any
   ↳ android.media.projection.MediaProjectionAppContent.Builder

Builder for MediaProjectionAppContent.

Summary

Public constructors
Builder(id: Int)

Creates a new Builder.

Public methods
MediaProjectionAppContent

Builds the MediaProjectionAppContent instance.

MediaProjectionAppContent.Builder
setIcon(icon: Icon)

Sets the icon to be displayed alongside the title

MediaProjectionAppContent.Builder
setThumbnail(thumbnail: Bitmap)

Sets the optional thumbnail for the content.

MediaProjectionAppContent.Builder

Sets the optional title for the content.

Public constructors

Builder

Added in API level 37
Builder(id: Int)

Creates a new Builder.

Parameters
id Int: The mandatory identifier for the content. This must uniquely identify the content within the context of the calling application.

Public methods

setIcon

Added in API level 37
fun setIcon(icon: Icon): MediaProjectionAppContent.Builder

Sets the icon to be displayed alongside the title

Return
MediaProjectionAppContent.Builder This Builder instance for chaining

setThumbnail

Added in API level 37
fun setThumbnail(thumbnail: Bitmap): MediaProjectionAppContent.Builder

Sets the optional thumbnail for the content.

Parameters
thumbnail Bitmap: A Bitmap to visually represent the content.
Return
MediaProjectionAppContent.Builder This Builder instance for chaining.

setTitle

Added in API level 37
fun setTitle(title: CharSequence): MediaProjectionAppContent.Builder

Sets the optional title for the content.

Parameters
title CharSequence: A CharSequence to display as the title.
Return
MediaProjectionAppContent.Builder This Builder instance for chaining.