public class MediaDescription
extends Object implements Parcelable
| java.lang.Object | |
| android.media.MediaDescription | |
适合显示的媒体项目的一组简单元数据。 这可以使用Builder创建,也可以使用getDescription()从现有元数据中getDescription() 。
Nested classes |
|
|---|---|
class |
MediaDescription.Builder 用于 |
Inherited constants |
|---|
android.os.Parcelable
|
Fields |
|
|---|---|
public static final Creator<MediaDescription> |
CREATOR |
公共方法(Public methods) |
|
|---|---|
int |
describeContents() 描述此Parcelable实例的封送表示中包含的特殊对象的种类。 |
CharSequence |
getDescription() 返回适合显示的描述或null。 |
Bundle |
getExtras() 返回添加到描述中的任何附加内容。 |
Bitmap |
getIconBitmap() 返回适合显示的位图图标或为空。 |
Uri |
getIconUri() 返回适合显示的图标的Uri或null。 |
String |
getMediaId() 返回媒体ID或null。 |
Uri |
getMediaUri() 返回表示此内容的Uri或null。 |
CharSequence |
getSubtitle() 返回适合显示的字幕或为空。 |
CharSequence |
getTitle() 返回适合显示的标题或为空。 |
String |
toString() 返回对象的字符串表示形式。 |
void |
writeToParcel(Parcel dest, int flags) 将此对象平铺到一个包裹中。 |
继承方法(Inherited methods) |
|
|---|---|
java.lang.Object
|
|
android.os.Parcelable
|
|
int describeContents ()
描述此Parcelable实例的封送表示中包含的特殊对象的种类。 例如,如果对象将在writeToParcel(Parcel, int)的输出中包含writeToParcel(Parcel, int) ,则此方法的返回值必须包含CONTENTS_FILE_DESCRIPTOR位。
| 返回(Returns) | |
|---|---|
int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. |
CharSequence getDescription ()
返回适合显示的描述或null。
| 返回(Returns) | |
|---|---|
CharSequence |
A description or null. |
Bundle getExtras ()
返回添加到描述中的任何附加内容。
| 返回(Returns) | |
|---|---|
Bundle |
A bundle of extras or null. |
Bitmap getIconBitmap ()
返回适合显示的位图图标或为空。
| 返回(Returns) | |
|---|---|
Bitmap |
An icon or null. |
Uri getIconUri ()
返回适合显示的图标的Uri或null。
| 返回(Returns) | |
|---|---|
Uri |
An icon uri or null. |
String getMediaId ()
返回媒体ID或null。 见METADATA_KEY_MEDIA_ID 。
| 返回(Returns) | |
|---|---|
String |
|
Uri getMediaUri ()
返回表示此内容的Uri或null。
| 返回(Returns) | |
|---|---|
Uri |
A media Uri or null. |
CharSequence getSubtitle ()
返回适合显示的字幕或为空。
| 返回(Returns) | |
|---|---|
CharSequence |
A subtitle or null. |
CharSequence getTitle ()
返回适合显示的标题或为空。
| 返回(Returns) | |
|---|---|
CharSequence |
A title or null. |
String toString ()
返回对象的字符串表示形式。 通常, toString方法将返回一个“文本表示”该对象的字符串。 结果应该是一个简洁但内容丰富的表述,对于一个人来说很容易阅读。 建议所有子类重写此方法。
toString类的方法Object返回一个字符串,其中包含对象为实例的类的名称,符号字符“ @ ”和对象的哈希代码的无符号十六进制表示形式。 换句话说,这个方法返回一个字符串,其值等于:
getClass().getName() + '@' + Integer.toHexString(hashCode())
| 返回(Returns) | |
|---|---|
String |
a string representation of the object. |
void writeToParcel (Parcel dest, int flags)
将此对象平铺到一个包裹中。
| 参数(Parameters) | |
|---|---|
dest |
Parcel: The Parcel in which the object should be written. |
flags |
int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. |