ViewProvider
@UnstableApi
interface ViewProvider
MediaRouteButtonViewProvider |
A provider of a media route button view to be displayed in the player UI. |
Provider of a view to be displayed in the player UI.
Summary
Public functions |
|
|---|---|
ListenableFuture<View!>! |
Returns a |
Public functions
getView
fun getView(viewGroup: ViewGroup!): ListenableFuture<View!>!
Returns a ListenableFuture with the view.
If the view cannot be provided, the future may fail with an exception. Consumers should handle the failure gracefully, for example by not showing the view.
The callback of the returned ListenableFuture may be called on a different thread than the caller's thread. If the caller wants to update the UI in the callbacks, it is responsible for forwarding the callback to the UI thread.
| Parameters | |
|---|---|
viewGroup: ViewGroup! |
The parent |
| Returns | |
|---|---|
ListenableFuture<View!>! |
A |