public
static
class
MediaRouter.RouteGroup
extends MediaRouter.RouteInfo
java.lang.Object | ||
↳ | android.media.MediaRouter.RouteInfo | |
↳ | android.media.MediaRouter.RouteGroup |
Information about a route that consists of multiple other routes in a group.
Inherited constants |
---|
From
class
android.media.MediaRouter.RouteInfo
|
Public methods | |
---|---|
void
|
addRoute(MediaRouter.RouteInfo route)
Add a route to this group. |
void
|
addRoute(MediaRouter.RouteInfo route, int insertAt)
Add a route to this group before the specified index. |
MediaRouter.RouteInfo
|
getRouteAt(int index)
Return the route in this group at the specified index |
int
|
getRouteCount()
|
void
|
removeRoute(MediaRouter.RouteInfo route)
Remove a route from this group. |
void
|
removeRoute(int index)
Remove the route at the specified index from this group. |
void
|
requestSetVolume(int volume)
Request a volume change for this route. |
void
|
requestUpdateVolume(int direction)
Request an incremental volume update for this route. |
void
|
setIconDrawable(Drawable icon)
Set an icon that will be used to represent this group. |
void
|
setIconResource(int resId)
Set an icon that will be used to represent this group. |
String
|
toString()
Returns a string representation of the object. |
Inherited methods | |
---|---|
From
class
android.media.MediaRouter.RouteInfo
| |
From
class
java.lang.Object
|
void addRoute (MediaRouter.RouteInfo route)
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
|
void addRoute (MediaRouter.RouteInfo route, int insertAt)
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
|
MediaRouter.RouteInfo getRouteAt (int index)
Return the route in this group at the specified index
Parameters | |
---|---|
index |
int :
Index to fetch |
Returns | |
---|---|
MediaRouter.RouteInfo |
The route at index |
int getRouteCount ()
Returns | |
---|---|
int |
The number of routes in this group |
void removeRoute (MediaRouter.RouteInfo route)
Remove a route from this group.
Parameters | |
---|---|
route |
MediaRouter.RouteInfo :
route to remove
|
void removeRoute (int index)
Remove the route at the specified index from this group.
Parameters | |
---|---|
index |
int :
index of the route to remove
|
void requestSetVolume (int volume)
Request a volume change for this route.
Parameters | |
---|---|
volume |
int :
value between 0 and getVolumeMax
|
void requestUpdateVolume (int direction)
Request an incremental volume update for this route.
Parameters | |
---|---|
direction |
int :
Delta to apply to the current volume
|
void setIconDrawable (Drawable icon)
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
|
void setIconResource (int resId)
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
|
String toString ()
Returns a string representation of the object. In general, the
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
Returns | |
---|---|
String |
a string representation of the object. |