MediaRouteControllerDialog
class MediaRouteControllerDialog : AlertDialog
| kotlin.Any | |||||
| ↳ | android.app.Dialog | ||||
| ↳ | androidx.activity.ComponentDialog | ||||
| ↳ | androidx.appcompat.app.AppCompatDialog | ||||
| ↳ | androidx.appcompat.app.AlertDialog | ||||
| ↳ | androidx.mediarouter.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 | |
|---|---|
MediaRouteButton |
|
MediaRouteActionProvider |
Summary
Public constructors |
|---|
MediaRouteControllerDialog(context: Context) |
MediaRouteControllerDialog(context: Context, theme: Int) |
Public functions |
|
|---|---|
View? |
Gets the media control view that was created by |
MediaSessionCompat.Token? |
Gets the session to use for metadata and transport controls. |
MediaRouter.RouteInfo |
getRoute()Gets the route that this dialog is controlling. |
Boolean |
Returns whether to enable the volume slider and volume control using the volume keys when the route supports it. |
Unit |
|
View? |
onCreateMediaControlView(savedInstanceState: Bundle?)Provides the subclass an opportunity to create a view that will replace the default media controls for the currently playing content. |
Unit |
|
Boolean |
|
Boolean |
|
Unit |
setVolumeControlEnabled(enable: Boolean)Sets whether to enable the volume slider and volume control using the volume keys when the route supports it. |
Inherited Constants |
||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Inherited functions |
||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
|
Public constructors
Public functions
getMediaControlView
fun getMediaControlView(): View?
Gets the media control view that was created by onCreateMediaControlView.
| Returns | |
|---|---|
View? |
The media control view, or null if none. |
getMediaSession
fun getMediaSession(): MediaSessionCompat.Token?
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
fun getRoute(): MediaRouter.RouteInfo
Gets the route that this dialog is controlling.
isVolumeControlEnabled
fun isVolumeControlEnabled(): Boolean
Returns whether to enable the volume slider and volume control using the volume keys when the route supports it.
onCreateMediaControlView
fun onCreateMediaControlView(savedInstanceState: Bundle?): View?
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. |
setVolumeControlEnabled
fun setVolumeControlEnabled(enable: Boolean): Unit
Sets whether to enable the volume slider and volume control using the volume keys when the route supports it.
The default value is true.