public class MediaRouteChooserDialogFragment extends DialogFragment
Creates a MediaRouteChooserDialog
. The application may subclass
this dialog fragment to customize the media route chooser dialog.
Fragment.InstantiationException, Fragment.SavedState
STYLE_NO_FRAME, STYLE_NO_INPUT, STYLE_NO_TITLE, STYLE_NORMAL
Constructor and Description |
---|
MediaRouteChooserDialogFragment()
Creates a media route chooser dialog fragment.
|
Modifier and Type | Method and Description |
---|---|
MediaRouteSelector |
getRouteSelector()
Gets the media route selector for filtering the routes that the user can select.
|
void |
onConfigurationChanged(Configuration newConfig)
Called by the system when the device configuration changes while your
component is running.
|
MediaRouteChooserDialog |
onCreateChooserDialog(Context context,
Bundle savedInstanceState)
Called when the chooser dialog is being created.
|
Dialog |
onCreateDialog(Bundle savedInstanceState)
Override to build your own custom Dialog container.
|
void |
setRouteSelector(MediaRouteSelector selector)
Sets the media route selector for filtering the routes that the user can select.
|
dismiss, dismissAllowingStateLoss, getDialog, getLayoutInflater, getShowsDialog, getTheme, isCancelable, onActivityCreated, onAttach, onCancel, onCreate, onDestroyView, onDetach, onDismiss, onSaveInstanceState, onStart, onStop, setCancelable, setShowsDialog, setStyle, setupDialog, show, show
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, hasOptionsMenu, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isVisible, onActivityResult, onAttach, onAttachFragment, onContextItemSelected, onCreateAnimation, onCreateContextMenu, onCreateOptionsMenu, onCreateView, onDestroy, onDestroyOptionsMenu, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onRequestPermissionsResult, onResume, onViewCreated, onViewStateRestored, registerForContextMenu, requestPermissions, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, toString, unregisterForContextMenu
public MediaRouteChooserDialogFragment()
All subclasses of this class must also possess a default constructor.
public MediaRouteSelector getRouteSelector()
public void setRouteSelector(MediaRouteSelector selector)
selector
- The selector to set.public MediaRouteChooserDialog onCreateChooserDialog(Context context, Bundle savedInstanceState)
Subclasses may override this method to customize the dialog.
public Dialog onCreateDialog(Bundle savedInstanceState)
DialogFragment
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 DialogFragment.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 DialogFragment.onCancel(DialogInterface)
and DialogFragment.onDismiss(DialogInterface)
.
onCreateDialog
in class DialogFragment
savedInstanceState
- The last saved instance state of the Fragment,
or null if this is a freshly created Fragment.public void onConfigurationChanged(Configuration newConfig)
ComponentCallbacks
At the time that this function has been called, your Resources object will have been updated to return resource values matching the new configuration.
For more information, read Handling Runtime Changes.
onConfigurationChanged
in interface ComponentCallbacks
onConfigurationChanged
in class Fragment
newConfig
- The new device configuration.