Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.

belongs to Maven artifact androidx.mediarouter:mediarouter:1.0.0-alpha5

MediaRouteControllerDialogFragment

public class MediaRouteControllerDialogFragment
extends DialogFragment

java.lang.Object
   ↳ androidx.fragment.app.Fragment
     ↳ androidx.fragment.app.DialogFragment
       ↳ androidx.mediarouter.app.MediaRouteControllerDialogFragment


Media route controller dialog fragment.

Creates a MediaRouteControllerDialog. The application may subclass this dialog fragment to customize the media route controller dialog.

Summary

Inherited constants

Public constructors

MediaRouteControllerDialogFragment()

Creates a media route controller dialog fragment.

Public methods

void onConfigurationChanged(Configuration newConfig)
MediaRouteControllerDialog onCreateControllerDialog(Context context, Bundle savedInstanceState)

Called when the controller dialog is being created.

Dialog onCreateDialog(Bundle savedInstanceState)

Override to build your own custom Dialog container.

void onStop()

Called when the Fragment is no longer started.

Inherited methods

Public constructors

MediaRouteControllerDialogFragment

public MediaRouteControllerDialogFragment ()

Creates a media route controller dialog fragment.

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

Public methods

onConfigurationChanged

public void onConfigurationChanged (Configuration newConfig)

Parameters
newConfig Configuration

onCreateControllerDialog

public MediaRouteControllerDialog onCreateControllerDialog (Context context, 
                Bundle savedInstanceState)

Called when the controller dialog is being created.

Subclasses may override this method to customize the dialog.

Parameters
context Context

savedInstanceState Bundle

Returns
MediaRouteControllerDialog

onCreateDialog

public Dialog onCreateDialog (Bundle savedInstanceState)

Override to build your own custom Dialog container. This is typically used to show an AlertDialog instead of a generic Dialog; when doing so, Fragment.onCreateView(LayoutInflater, ViewGroup, Bundle) does not need to be implemented since the AlertDialog takes care of its own content.

This method will be called after onCreate(Bundle) and before Fragment.onCreateView(LayoutInflater, ViewGroup, Bundle). The default implementation simply instantiates and returns a Dialog class.

Note: DialogFragment own the Dialog.setOnCancelListener and Dialog.setOnDismissListener callbacks. You must not set them yourself. To find out about these events, override onCancel(DialogInterface) and onDismiss(DialogInterface).

Parameters
savedInstanceState Bundle: The last saved instance state of the Fragment, or null if this is a freshly created Fragment.

Returns
Dialog Return a new Dialog instance to be displayed by the Fragment.

onStop

public void onStop ()

Called when the Fragment is no longer started. This is generally tied to Activity.onStop of the containing Activity's lifecycle.