Most visited

Recently visited

Added in API level 21

MediaDescription.Builder

public static class MediaDescription.Builder
extends Object

java.lang.Object
   ↳ android.media.MediaDescription.Builder


MediaDescription对象的构建器。

Summary

Public constructors

MediaDescription.Builder()

创建一个初始为空的构建器。

Public methods

MediaDescription build()
MediaDescription.Builder setDescription(CharSequence description)

设置描述。

MediaDescription.Builder setExtras(Bundle extras)

设置一系列附加功能。

MediaDescription.Builder setIconBitmap(Bitmap icon)

设置图标。

MediaDescription.Builder setIconUri(Uri iconUri)

设置图标uri。

MediaDescription.Builder setMediaId(String mediaId)

设置媒体ID。

MediaDescription.Builder setMediaUri(Uri mediaUri)

设置媒体uri。

MediaDescription.Builder setSubtitle(CharSequence subtitle)

设置字幕。

MediaDescription.Builder setTitle(CharSequence title)

设置标题。

Inherited methods

From class java.lang.Object

Public constructors

MediaDescription.Builder

Added in API level 21
MediaDescription.Builder ()

创建一个初始为空的构建器。

Public methods

build

Added in API level 21
MediaDescription build ()

Returns
MediaDescription

setDescription

Added in API level 21
MediaDescription.Builder setDescription (CharSequence description)

设置描述。

Parameters
description CharSequence: A description suitable for display to the user or null.
Returns
MediaDescription.Builder this

setExtras

Added in API level 21
MediaDescription.Builder setExtras (Bundle extras)

设置一系列附加功能。

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

setIconBitmap

Added in API level 21
MediaDescription.Builder setIconBitmap (Bitmap icon)

设置图标。

Parameters
icon Bitmap: A Bitmap icon suitable for display to the user or null.
Returns
MediaDescription.Builder this

setIconUri

Added in API level 21
MediaDescription.Builder setIconUri (Uri iconUri)

设置图标uri。

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

setMediaId

Added in API level 21
MediaDescription.Builder setMediaId (String mediaId)

设置媒体ID。

Parameters
mediaId String: The unique id for the item or null.
Returns
MediaDescription.Builder this

setMediaUri

Added in API level 23
MediaDescription.Builder setMediaUri (Uri mediaUri)

设置媒体uri。

Parameters
mediaUri Uri: The content's Uri for the item or null.
Returns
MediaDescription.Builder this

setSubtitle

Added in API level 21
MediaDescription.Builder setSubtitle (CharSequence subtitle)

设置字幕。

Parameters
subtitle CharSequence: A subtitle suitable for display to the user or null.
Returns
MediaDescription.Builder this

setTitle

Added in API level 21
MediaDescription.Builder setTitle (CharSequence title)

设置标题。

Parameters
title CharSequence: A title suitable for display to the user or null.
Returns
MediaDescription.Builder this

Hooray!