MediaRouteDialogFactory


class MediaRouteDialogFactory


The media route dialog factory is responsible for creating the media route chooser and controller dialogs as needed.

The application can customize the dialogs by providing a subclass of the dialog factory to the MediaRouteButton using the setDialogFactory method.

Summary

Public constructors

Creates a default media route dialog factory.

Public functions

java-static MediaRouteDialogFactory

Gets the default factory instance.

MediaRouteChooserDialogFragment

Called when the chooser dialog is being opened and it is time to create the fragment.

MediaRouteControllerDialogFragment

Called when the controller dialog is being opened and it is time to create the fragment.

Public constructors

MediaRouteDialogFactory

Added in 1.1.0
MediaRouteDialogFactory()

Creates a default media route dialog factory.

Public functions

getDefault

Added in 1.1.0
java-static fun getDefault(): MediaRouteDialogFactory

Gets the default factory instance.

Returns
MediaRouteDialogFactory

The default media route dialog factory, never null.

onCreateChooserDialogFragment

Added in 1.1.0
fun onCreateChooserDialogFragment(): MediaRouteChooserDialogFragment

Called when the chooser dialog is being opened and it is time to create the fragment.

Subclasses may override this method to create a customized fragment.

Returns
MediaRouteChooserDialogFragment

The media route chooser dialog fragment, must not be null.

onCreateControllerDialogFragment

Added in 1.1.0
fun onCreateControllerDialogFragment(): MediaRouteControllerDialogFragment

Called when the controller dialog is being opened and it is time to create the fragment.

Subclasses may override this method to create a customized fragment.

Returns
MediaRouteControllerDialogFragment

The media route controller dialog fragment, must not be null.