@UnstableApi
interface ViewProvider

Known direct subclasses
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!>!
getView(viewGroup: ViewGroup!)

Returns a ListenableFuture with the view.

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 ViewGroup into which the returned view will be inserted.

Returns
ListenableFuture<View!>!

A ListenableFuture that will resolve to the View.