Android Dev Summit, October 23-24: two days of technical content, directly from the Android team. Sign-up for livestream updates.

MediaRouteChooserDialogFragment

open class MediaRouteChooserDialogFragment : DialogFragment
kotlin.Any
   ↳ androidx.fragment.app.Fragment
   ↳ androidx.fragment.app.DialogFragment
   ↳ androidx.mediarouter.app.MediaRouteChooserDialogFragment

Media route chooser dialog fragment.

Creates a MediaRouteChooserDialog. The application may subclass this dialog fragment to customize the media route chooser dialog.

Summary

Inherited constants

Public constructors

Creates a media route chooser dialog fragment.

Public methods

open MediaRouteSelector!

Gets the media route selector for filtering the routes that the user can select.

open Unit

open MediaRouteChooserDialog!
onCreateChooserDialog(context: Context!, savedInstanceState: Bundle!)

Called when the chooser dialog is being created.

open Dialog
onCreateDialog(savedInstanceState: Bundle?)

open Unit

Sets the media route selector for filtering the routes that the user can select.

Inherited functions

Public constructors

<init>

MediaRouteChooserDialogFragment()

Creates a media route chooser dialog fragment.

All subclasses of this class must also possess a default constructor.

Public methods

getRouteSelector

open fun getRouteSelector(): MediaRouteSelector!

Gets the media route selector for filtering the routes that the user can select.

Return
MediaRouteSelector!: The selector, never null.

onConfigurationChanged

open fun onConfigurationChanged(newConfig: Configuration): Unit

onCreateChooserDialog

open fun onCreateChooserDialog(context: Context!, savedInstanceState: Bundle!): MediaRouteChooserDialog!

Called when the chooser dialog is being created.

Subclasses may override this method to customize the dialog.

onCreateDialog

open fun onCreateDialog(savedInstanceState: Bundle?): Dialog

setRouteSelector

open fun setRouteSelector(selector: MediaRouteSelector!): Unit

Sets the media route selector for filtering the routes that the user can select. This method must be called before the fragment is added.

Parameters
selector MediaRouteSelector!: The selector to set.