MediaMetadata.Builder | API reference | Android Developers
Summary: Ctors | Methods | Inherited Methods
public
static
final
class
MediaMetadata.Builder
extends Object
Use to build MediaMetadata objects. The system defined metadata keys must use the appropriate data type.
Summary
Public constructors | |
|---|---|
Builder()
Create an empty Builder. |
|
Builder(MediaMetadata source)
Create a Builder using a |
|
Public methods | |
|---|---|
MediaMetadata
|
build()
Creates a |
MediaMetadata.Builder
|
putBitmap(String key, Bitmap value)
Put a |
MediaMetadata.Builder
|
putLong(String key, long value)
Put a long value into the metadata. |
MediaMetadata.Builder
|
putRating(String key, Rating value)
Put a |
MediaMetadata.Builder
|
putString(String key, String value)
Put a String value into the metadata. |
MediaMetadata.Builder
|
putText(String key, CharSequence value)
Put a CharSequence value into the metadata. |
MediaMetadata.Builder
|
setBitmapDimensionLimit(int bitmapDimensionLimit)
Sets the maximum width/height (in pixels) for the bitmaps in the metadata. |
Inherited methods | |||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
From class
| |||||||||||||||||||||||
Public constructors
Builder
public Builder ()
Create an empty Builder. Any field that should be included in the
MediaMetadata must be added.
Builder
public Builder (MediaMetadata source)
Create a Builder using a MediaMetadata instance to set the
initial values. All fields in the source metadata will be included in
the new metadata. Fields can be overwritten by adding the same key.
Public methods
setBitmapDimensionLimit
public MediaMetadata.Builder setBitmapDimensionLimit (int bitmapDimensionLimit)
Sets the maximum width/height (in pixels) for the bitmaps in the metadata.
Bitmaps will be replaced with scaled down copies if their width (or height) is
larger than bitmapDimensionLimit.
In order to unset the limit, pass Integer.MAX_VALUE as
bitmapDimensionLimit.
| Parameters | |
|---|---|
bitmapDimensionLimit |
int: The maximum width/height (in pixels) for bitmaps
contained in the metadata. Non-positive values are ignored.
Pass Integer.MAX_VALUE to unset the limit.
Value is 1 or greater |
| Returns | |
|---|---|
MediaMetadata.Builder |
This value cannot be null. |