public class MediaRouteChooserDialog extends Dialog
MediaRouter
.
This dialog allows the user to choose a route that matches a given selector.
MediaRouteButton
,
TODO: Move this back into the API, as in the support library media router.
DialogInterface.OnCancelListener, DialogInterface.OnClickListener, DialogInterface.OnDismissListener, DialogInterface.OnKeyListener, DialogInterface.OnMultiChoiceClickListener, DialogInterface.OnShowListener
mCancelable
BUTTON_NEGATIVE, BUTTON_NEUTRAL, BUTTON_POSITIVE, BUTTON1, BUTTON2, BUTTON3
Constructor and Description |
---|
MediaRouteChooserDialog(Context context,
int theme) |
Modifier and Type | Method and Description |
---|---|
int |
getRouteTypes()
Gets the media route types for filtering the routes that the user can
select using the media route chooser dialog.
|
void |
onAttachedToWindow()
Called when the window has been attached to the window manager.
|
protected void |
onCreate(Bundle savedInstanceState)
Similar to
Activity.onCreate(android.os.Bundle) , you should initialize your dialog
in this method, including calling Dialog.setContentView(int) . |
void |
onDetachedFromWindow()
Called when the window has been attached to the window manager.
|
boolean |
onFilterRoute(MediaRouter.RouteInfo route)
Returns true if the route should be included in the list.
|
void |
refreshRoutes()
Refreshes the list of routes that are shown in the chooser dialog.
|
void |
setExtendedSettingsClickListener(View.OnClickListener listener) |
void |
setRouteTypes(int types)
Sets the types of routes that will be shown in the media route chooser dialog
launched by this button.
|
addContentView, cancel, closeOptionsMenu, create, dismiss, dispatchGenericMotionEvent, dispatchKeyEvent, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, findViewById, getActionBar, getContext, getCurrentFocus, getLayoutInflater, getOwnerActivity, getSearchEvent, getVolumeControlStream, getWindow, hide, invalidateOptionsMenu, isShowing, onActionModeFinished, onActionModeStarted, onBackPressed, onContentChanged, onContextItemSelected, onContextMenuClosed, onCreateContextMenu, onCreateOptionsMenu, onCreatePanelMenu, onCreatePanelView, onGenericMotionEvent, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyShortcut, onKeyUp, onMenuItemSelected, onMenuOpened, onOptionsItemSelected, onOptionsMenuClosed, onPanelClosed, onPrepareOptionsMenu, onPreparePanel, onRestoreInstanceState, onSaveInstanceState, onSearchRequested, onSearchRequested, onStart, onStop, onTouchEvent, onTrackballEvent, onWindowAttributesChanged, onWindowDismissed, onWindowFocusChanged, onWindowStartingActionMode, onWindowStartingActionMode, openContextMenu, openOptionsMenu, registerForContextMenu, requestWindowFeature, setCancelable, setCanceledOnTouchOutside, setCancelMessage, setContentView, setContentView, setContentView, setDismissMessage, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setOnCancelListener, setOnDismissListener, setOnKeyListener, setOnShowListener, setOwnerActivity, setTitle, setTitle, setVolumeControlStream, show, takeCancelAndDismissListeners, takeKeyEvents, unregisterForContextMenu
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onProvideKeyboardShortcuts
public MediaRouteChooserDialog(Context context, int theme)
public int getRouteTypes()
public void setRouteTypes(int types)
types
- The route types to match.public void setExtendedSettingsClickListener(View.OnClickListener listener)
public boolean onFilterRoute(MediaRouter.RouteInfo route)
The default implementation returns true for enabled non-default routes that match the route types. Subclasses can override this method to filter routes differently.
route
- The route to consider, never null.protected void onCreate(Bundle savedInstanceState)
Dialog
Activity.onCreate(android.os.Bundle)
, you should initialize your dialog
in this method, including calling Dialog.setContentView(int)
.onCreate
in class Dialog
savedInstanceState
- If this dialog is being reinitialized after a
the hosting activity was previously shut down, holds the result from
the most recent call to Dialog.onSaveInstanceState()
, or null if this
is the first time.public void onAttachedToWindow()
Window.Callback
View.onAttachedToWindow()
for more information.onAttachedToWindow
in interface Window.Callback
onAttachedToWindow
in class Dialog
public void onDetachedFromWindow()
Window.Callback
View.onDetachedFromWindow()
for more information.onDetachedFromWindow
in interface Window.Callback
onDetachedFromWindow
in class Dialog
public void refreshRoutes()