Save the date! Android Dev Summit is coming to Sunnyvale, CA on Oct 23-24, 2019.

MediaRouteDialogFactory

open class MediaRouteDialogFactory
kotlin.Any
   ↳ androidx.mediarouter.app.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 methods
open MediaRouteChooserDialogFragment

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

open MediaRouteControllerDialogFragment

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

open static MediaRouteDialogFactory

Gets the default factory instance.

Public constructors

<init>

MediaRouteDialogFactory()

Creates a default media route dialog factory.

Public methods

onCreateChooserDialogFragment

@NonNull open 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.

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

onCreateControllerDialogFragment

@NonNull open 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.

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

getDefault

@NonNull open static fun getDefault(): MediaRouteDialogFactory

Gets the default factory instance.

Return
MediaRouteDialogFactory: The default media route dialog factory, never null.