MediaRouteControllerDialog
public class MediaRouteControllerDialog extends AlertDialog
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(@NonNull Context context) |
MediaRouteControllerDialog(@NonNull Context context, int theme) |
Public methods |
|
|---|---|
@Nullable View |
Gets the media control view that was created by |
@Nullable MediaSessionCompat.Token |
Gets the session to use for metadata and transport controls. |
@NonNull 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. |
void |
|
@Nullable View |
onCreateMediaControlView(@Nullable Bundle savedInstanceState)Provides the subclass an opportunity to create a view that will replace the default media controls for the currently playing content. |
void |
|
boolean |
|
boolean |
|
void |
setVolumeControlEnabled(boolean enable)Sets whether to enable the volume slider and volume control using the volume keys when the route supports it. |
Inherited Constants |
||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Inherited methods |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Public constructors
MediaRouteControllerDialog
public MediaRouteControllerDialog(@NonNull Context context)
MediaRouteControllerDialog
public MediaRouteControllerDialog(@NonNull Context context, int theme)
Public methods
getMediaControlView
public @Nullable View getMediaControlView()
Gets the media control view that was created by onCreateMediaControlView.
getMediaSession
public @Nullable MediaSessionCompat.Token getMediaSession()
Gets the session to use for metadata and transport controls.
| Returns | |
|---|---|
@Nullable MediaSessionCompat.Token |
The token for the session to use or null if none. |
getRoute
public @NonNull MediaRouter.RouteInfo getRoute()
Gets the route that this dialog is controlling.
isVolumeControlEnabled
public boolean isVolumeControlEnabled()
Returns whether to enable the volume slider and volume control using the volume keys when the route supports it.
onCreateMediaControlView
public @Nullable View onCreateMediaControlView(@Nullable Bundle savedInstanceState)
Provides the subclass an opportunity to create a view that will replace the default media controls for the currently playing content.
setVolumeControlEnabled
public 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.