Skip to content

Most visited

Recently visited

navigation
added in version 22.1.0
belongs to Maven artifact com.android.support:mediarouter-v7:27.0.0

MediaRouteDialogFactory

public class MediaRouteDialogFactory
extends Object

java.lang.Object
   ↳ android.support.v7.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

MediaRouteDialogFactory()

Creates a default media route dialog factory.

Public methods

static MediaRouteDialogFactory getDefault()

Gets the default factory instance.

MediaRouteChooserDialogFragment onCreateChooserDialogFragment()

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

MediaRouteControllerDialogFragment onCreateControllerDialogFragment()

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

Inherited methods

From class java.lang.Object

Public constructors

MediaRouteDialogFactory

added in version 22.1.0
MediaRouteDialogFactory ()

Creates a default media route dialog factory.

Public methods

getDefault

added in version 22.1.0
MediaRouteDialogFactory getDefault ()

Gets the default factory instance.

Returns
MediaRouteDialogFactory The default media route dialog factory, never null.

onCreateChooserDialogFragment

added in version 22.1.0
MediaRouteChooserDialogFragment onCreateChooserDialogFragment ()

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 version 22.1.0
MediaRouteControllerDialogFragment onCreateControllerDialogFragment ()

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.

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Follow Google Developers on WeChat

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience.
(Sep 2017 survey)