RouteGroup
open class RouteGroup : MediaRouter.RouteInfo
| kotlin.Any | ||
| ↳ | android.media.MediaRouter.RouteInfo | |
| ↳ | android.media.MediaRouter.RouteGroup | |
Information about a route that consists of multiple other routes in a group.
Summary
| Inherited constants | |
|---|---|
| Public methods | |
|---|---|
| open Unit |
addRoute(route: MediaRouter.RouteInfo!)Add a route to this group. |
| open Unit |
addRoute(route: MediaRouter.RouteInfo!, insertAt: Int)Add a route to this group before the specified index. |
| open MediaRouter.RouteInfo! |
getRouteAt(index: Int)Return the route in this group at the specified index |
| open Int | |
| open Unit |
removeRoute(route: MediaRouter.RouteInfo!)Remove a route from this group. |
| open Unit |
removeRoute(index: Int)Remove the route at the specified index from this group. |
| open Unit |
requestSetVolume(volume: Int)Request a volume change for this route. |
| open Unit |
requestUpdateVolume(direction: Int)Request an incremental volume update for this route. |
| open Unit |
setIconDrawable(icon: Drawable!)Set an icon that will be used to represent this group. |
| open Unit |
setIconResource(resId: Int)Set an icon that will be used to represent this group. |
| open String |
toString()Returns a string representation of the object. |
| Inherited functions | |
|---|---|
Public methods
addRoute
open fun addRoute(route: MediaRouter.RouteInfo!): Unit
Add a route to this group. The route must not currently belong to another group.
| Parameters | |
|---|---|
route |
MediaRouter.RouteInfo!: route to add to this group |
addRoute
open fun addRoute(
route: MediaRouter.RouteInfo!,
insertAt: Int
): Unit
Add a route to this group before the specified index.
| Parameters | |
|---|---|
route |
MediaRouter.RouteInfo!: route to add |
insertAt |
Int: insert the new route before this index |
getRouteAt
open fun getRouteAt(index: Int): MediaRouter.RouteInfo!
Return the route in this group at the specified index
| Parameters | |
|---|---|
index |
Int: Index to fetch |
| Return | |
|---|---|
MediaRouter.RouteInfo! |
The route at index |
getRouteCount
open fun getRouteCount(): Int
| Return | |
|---|---|
Int |
The number of routes in this group |
removeRoute
open fun removeRoute(route: MediaRouter.RouteInfo!): Unit
Remove a route from this group.
| Parameters | |
|---|---|
route |
MediaRouter.RouteInfo!: route to remove |
removeRoute
open fun removeRoute(index: Int): Unit
Remove the route at the specified index from this group.
| Parameters | |
|---|---|
index |
Int: index of the route to remove |
requestSetVolume
open fun requestSetVolume(volume: Int): Unit
Request a volume change for this route.
| Parameters | |
|---|---|
volume |
Int: value between 0 and getVolumeMax |
requestUpdateVolume
open fun requestUpdateVolume(direction: Int): Unit
Request an incremental volume update for this route.
| Parameters | |
|---|---|
direction |
Int: Delta to apply to the current volume |
setIconDrawable
open fun setIconDrawable(icon: Drawable!): Unit
Set an icon that will be used to represent this group. The system may use this icon in picker UIs or similar.
| Parameters | |
|---|---|
icon |
Drawable!: icon drawable to use to represent this group |
setIconResource
open fun setIconResource(resId: Int): Unit
Set an icon that will be used to represent this group. The system may use this icon in picker UIs or similar.
| Parameters | |
|---|---|
resId |
Int: Resource ID of an icon drawable to use to represent this group |
toString
open fun toString(): String
Returns a string representation of the object.
| Return | |
|---|---|
String |
a string representation of the object. |