@UnstableApi
public 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 methods

abstract ListenableFuture<View>
getView(ViewGroup viewGroup)

Returns a ListenableFuture with the view.

Public methods

getView

abstract ListenableFuture<ViewgetView(ViewGroup viewGroup)

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.