lightbulb_outline Please take our October 2018 developer survey. Start survey
added in version 22.1.0
belongs to Maven artifact androidx.media:media:1.0.0

MediaDescriptionCompat.Builder

public static final class MediaDescriptionCompat.Builder
extends Object

java.lang.Object
   ↳ android.support.v4.media.MediaDescriptionCompat.Builder


Builder for MediaDescriptionCompat objects.

Summary

Public constructors

MediaDescriptionCompat.Builder()

Creates an initially empty builder.

Public methods

MediaDescriptionCompat build()

Creates a MediaDescriptionCompat instance with the specified fields.

MediaDescriptionCompat.Builder setDescription(CharSequence description)

Sets the description.

MediaDescriptionCompat.Builder setExtras(Bundle extras)

Sets a bundle of extras.

MediaDescriptionCompat.Builder setIconBitmap(Bitmap icon)

Sets the icon.

MediaDescriptionCompat.Builder setIconUri(Uri iconUri)

Sets the icon uri.

MediaDescriptionCompat.Builder setMediaId(String mediaId)

Sets the media id.

MediaDescriptionCompat.Builder setMediaUri(Uri mediaUri)

Sets the media uri.

MediaDescriptionCompat.Builder setSubtitle(CharSequence subtitle)

Sets the subtitle.

MediaDescriptionCompat.Builder setTitle(CharSequence title)

Sets the title.

Inherited methods

Public constructors

MediaDescriptionCompat.Builder

added in version 22.1.0
public MediaDescriptionCompat.Builder ()

Creates an initially empty builder.

Public methods

build

added in version 22.1.0
public MediaDescriptionCompat build ()

Creates a MediaDescriptionCompat instance with the specified fields.

Returns
MediaDescriptionCompat A MediaDescriptionCompat instance.

setDescription

added in version 22.1.0
public MediaDescriptionCompat.Builder setDescription (CharSequence description)

Sets the description.

Parameters
description CharSequence: A description suitable for display to the user or null.

Returns
MediaDescriptionCompat.Builder this

setExtras

added in version 22.1.0
public MediaDescriptionCompat.Builder setExtras (Bundle extras)

Sets a bundle of extras.

Parameters
extras Bundle: The extras to include with this description or null.

Returns
MediaDescriptionCompat.Builder this

setIconBitmap

added in version 22.1.0
public MediaDescriptionCompat.Builder setIconBitmap (Bitmap icon)

Sets the icon.

Parameters
icon Bitmap: A Bitmap icon suitable for display to the user or null.

Returns
MediaDescriptionCompat.Builder this

setIconUri

added in version 22.1.0
public MediaDescriptionCompat.Builder setIconUri (Uri iconUri)

Sets the icon uri.

Parameters
iconUri Uri: A Uri for an icon suitable for display to the user or null.

Returns
MediaDescriptionCompat.Builder this

setMediaId

added in version 22.1.0
public MediaDescriptionCompat.Builder setMediaId (String mediaId)

Sets the media id.

Parameters
mediaId String: The unique id for the item or null.

Returns
MediaDescriptionCompat.Builder this

setMediaUri

public MediaDescriptionCompat.Builder setMediaUri (Uri mediaUri)

Sets the media uri.

Parameters
mediaUri Uri: The content's Uri for the item or null.

Returns
MediaDescriptionCompat.Builder this

setSubtitle

added in version 22.1.0
public MediaDescriptionCompat.Builder setSubtitle (CharSequence subtitle)

Sets the subtitle.

Parameters
subtitle CharSequence: A subtitle suitable for display to the user or null.

Returns
MediaDescriptionCompat.Builder this

setTitle

added in version 22.1.0
public MediaDescriptionCompat.Builder setTitle (CharSequence title)

Sets the title.

Parameters
title CharSequence: A title suitable for display to the user or null.

Returns
MediaDescriptionCompat.Builder this