Back to Exoplayer

Bundleable.Creator (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/Bundleable.Creator.html

latest1.9 KB
Original Source

Package com.google.android.exoplayer2

Interface Bundleable.Creator<T extends Bundleable>


public static interfaceBundleable.Creator\<T extends [Bundleable](Bundleable.html "interface in com.google.android.exoplayer2")\>

Interface for the static CREATOR field of Bundleable classes.

Method Summary

All Methods Instance Methods Abstract Methods | Modifier and Type | Method | Description | | --- | --- | --- | | T | fromBundle​(Bundle bundle) | Restores a Bundleable instance from a Bundle produced by Bundleable.toBundle(). |

Method Detail

- 

fromBundle

[T](Bundleable.Creator.html "type parameter in Bundleable.Creator")fromBundle​([Bundle](https://developer.android.com/reference/android/os/Bundle.html "class or interface in android.os")bundle)

Restores a Bundleable instance from a Bundle produced by Bundleable.toBundle().

It guarantees the compatibility of Bundle representations produced by different versions of Bundleable.toBundle() by providing best default values for missing fields. It throws an exception if any essential fields are missing.