belongs to Maven artifact com.android.support:mediarouter-v7:28.0.0-alpha1
MediaRouteControllerDialog
public
class
MediaRouteControllerDialog
extends AlertDialog
java.lang.Object | ||||
↳ | android.app.Dialog | |||
↳ | android.support.v7.app.AppCompatDialog | |||
↳ | android.support.v7.app.AlertDialog | |||
↳ | android.support.v7.app.MediaRouteControllerDialog |
This class implements the route controller dialog for MediaRouter
.
This dialog allows the user to control or disconnect from the currently selected route.
See also:
Summary
Public constructors | |
---|---|
MediaRouteControllerDialog(Context context)
|
|
MediaRouteControllerDialog(Context context, int theme)
|
Public methods | |
---|---|
View
|
getMediaControlView()
Gets the media control view that was created by |
MediaSessionCompat.Token
|
getMediaSession()
Gets the session to use for metadata and transport controls. |
MediaRouter.RouteInfo
|
getRoute()
Gets the route that this dialog is controlling. |
boolean
|
isVolumeControlEnabled()
Returns whether to enable the volume slider and volume control using the volume keys when the route supports it. |
void
|
onAttachedToWindow()
|
View
|
onCreateMediaControlView(Bundle savedInstanceState)
Provides the subclass an opportunity to create a view that will replace the default media controls for the currently playing content. |
void
|
onDetachedFromWindow()
|
boolean
|
onKeyDown(int keyCode, KeyEvent event)
|
boolean
|
onKeyUp(int keyCode, KeyEvent event)
|
void
|
setVolumeControlEnabled(boolean enable)
Sets whether to enable the volume slider and volume control using the volume keys when the route supports it. |
Inherited methods | |
---|---|
![]()
android.support.v7.app.AlertDialog
| |
![]()
android.support.v7.app.AppCompatDialog
| |
![]()
android.app.Dialog
| |
![]()
java.lang.Object
| |
![]()
android.content.DialogInterface
| |
![]()
android.support.v7.app.AppCompatCallback
| |
![]()
android.view.Window.Callback
| |
![]()
android.view.KeyEvent.Callback
| |
![]()
android.view.View.OnCreateContextMenuListener
|
Public constructors
MediaRouteControllerDialog
MediaRouteControllerDialog (Context context)
Parameters | |
---|---|
context |
Context |
MediaRouteControllerDialog
MediaRouteControllerDialog (Context context, int theme)
Parameters | |
---|---|
context |
Context |
theme |
int |
Public methods
getMediaControlView
View getMediaControlView ()
Gets the media control view that was created by onCreateMediaControlView(Bundle)
.
Returns | |
---|---|
View |
The media control view, or null if none. |
getMediaSession
MediaSessionCompat.Token getMediaSession ()
Gets the session to use for metadata and transport controls.
Returns | |
---|---|
MediaSessionCompat.Token |
The token for the session to use or null if none. |
getRoute
MediaRouter.RouteInfo getRoute ()
Gets the route that this dialog is controlling.
Returns | |
---|---|
MediaRouter.RouteInfo |
isVolumeControlEnabled
boolean isVolumeControlEnabled ()
Returns whether to enable the volume slider and volume control using the volume keys when the route supports it.
Returns | |
---|---|
boolean |
onAttachedToWindow
void onAttachedToWindow ()
onCreateMediaControlView
View onCreateMediaControlView (Bundle savedInstanceState)
Provides the subclass an opportunity to create a view that will replace the default media controls for the currently playing content.
Parameters | |
---|---|
savedInstanceState |
Bundle : The dialog's saved instance state. |
Returns | |
---|---|
View |
The media control view, or null if none. |
onDetachedFromWindow
void onDetachedFromWindow ()
onKeyDown
boolean onKeyDown (int keyCode, KeyEvent event)
Parameters | |
---|---|
keyCode |
int |
event |
KeyEvent |
Returns | |
---|---|
boolean |
onKeyUp
boolean onKeyUp (int keyCode, KeyEvent event)
Parameters | |
---|---|
keyCode |
int |
event |
KeyEvent |
Returns | |
---|---|
boolean |
setVolumeControlEnabled
void setVolumeControlEnabled (boolean enable)
Sets whether to enable the volume slider and volume control using the volume keys when the route supports it.
The default value is true.
Parameters | |
---|---|
enable |
boolean |
Protected methods
Interfaces
Classes
- ActionBar
- ActionBar.LayoutParams
- ActionBar.Tab
- ActionBarDrawerToggle
- AlertDialog
- AlertDialog.Builder
- AppCompatActivity
- AppCompatDelegate
- AppCompatDialog
- AppCompatDialogFragment
- AppCompatViewInflater
- MediaRouteActionProvider
- MediaRouteButton
- MediaRouteChooserDialog
- MediaRouteChooserDialogFragment
- MediaRouteControllerDialog
- MediaRouteControllerDialogFragment
- MediaRouteDialogFactory
- MediaRouteDiscoveryFragment