Most visited

Recently visited

Added in API level 16

MediaRouter.SimpleCallback

public static class MediaRouter.SimpleCallback
extends MediaRouter.Callback

java.lang.Object
   ↳ android.media.MediaRouter.Callback
     ↳ android.media.MediaRouter.SimpleCallback


存根MediaRouter.Callback实现。 每个抽象方法都被定义为no-op。 覆盖你所需要的。

Summary

Public constructors

MediaRouter.SimpleCallback()

Public methods

void onRouteAdded(MediaRouter router, MediaRouter.RouteInfo info)

当添加指定类型的路由时调用。

void onRouteChanged(MediaRouter router, MediaRouter.RouteInfo info)

当指示路线的某个方面发生变化时调用。

void onRouteGrouped(MediaRouter router, MediaRouter.RouteInfo info, MediaRouter.RouteGroup group, int index)

当路由被添加到组时被调用。

void onRouteRemoved(MediaRouter router, MediaRouter.RouteInfo info)

当指定类型的路由被删除时调用。

void onRouteSelected(MediaRouter router, int type, MediaRouter.RouteInfo info)

当提供的路线被选为给定路线类型的活动路线时调用。

void onRouteUngrouped(MediaRouter router, MediaRouter.RouteInfo info, MediaRouter.RouteGroup group)

当路线从组中移除时调用。

void onRouteUnselected(MediaRouter router, int type, MediaRouter.RouteInfo info)

当提供的路由变为未选中时,调用该路由作为给定路由类型的活动路由。

void onRouteVolumeChanged(MediaRouter router, MediaRouter.RouteInfo info)

当路线的音量变化时调用。

Inherited methods

From class android.media.MediaRouter.Callback
From class java.lang.Object

Public constructors

MediaRouter.SimpleCallback

Added in API level 16
MediaRouter.SimpleCallback ()

Public methods

onRouteAdded

Added in API level 16
void onRouteAdded (MediaRouter router, 
                MediaRouter.RouteInfo info)

当添加指定类型的路由时调用。

Parameters
router MediaRouter: the MediaRouter reporting the event
info MediaRouter.RouteInfo: Route that has become available for use

onRouteChanged

Added in API level 16
void onRouteChanged (MediaRouter router, 
                MediaRouter.RouteInfo info)

当指示路线的某个方面发生变化时调用。

这并不表示此路线支持的类型已更改,只是名称或状态等整型信息已更新。

Parameters
router MediaRouter: the MediaRouter reporting the event
info MediaRouter.RouteInfo: The route that was changed

onRouteGrouped

Added in API level 16
void onRouteGrouped (MediaRouter router, 
                MediaRouter.RouteInfo info, 
                MediaRouter.RouteGroup group, 
                int index)

当路由被添加到组时被调用。

Parameters
router MediaRouter: the MediaRouter reporting the event
info MediaRouter.RouteInfo: The route that was added
group MediaRouter.RouteGroup: The group the route was added to
index int: The route index within group that info was added at

onRouteRemoved

Added in API level 16
void onRouteRemoved (MediaRouter router, 
                MediaRouter.RouteInfo info)

当指定类型的路由被删除时调用。

Parameters
router MediaRouter: the MediaRouter reporting the event
info MediaRouter.RouteInfo: Route that has been removed from availability

onRouteSelected

Added in API level 16
void onRouteSelected (MediaRouter router, 
                int type, 
                MediaRouter.RouteInfo info)

当提供的路线被选为给定路线类型的活动路线时调用。

Parameters
router MediaRouter: the MediaRouter reporting the event
type int: Type flag set indicating the routes that have been selected
info MediaRouter.RouteInfo: Route that has been selected for the given route types

onRouteUngrouped

Added in API level 16
void onRouteUngrouped (MediaRouter router, 
                MediaRouter.RouteInfo info, 
                MediaRouter.RouteGroup group)

当路线从组中移除时调用。

Parameters
router MediaRouter: the MediaRouter reporting the event
info MediaRouter.RouteInfo: The route that was removed
group MediaRouter.RouteGroup: The group the route was removed from

onRouteUnselected

Added in API level 16
void onRouteUnselected (MediaRouter router, 
                int type, 
                MediaRouter.RouteInfo info)

当提供的路由变为未选中时,调用该路由作为给定路由类型的活动路由。

Parameters
router MediaRouter: the MediaRouter reporting the event
type int: Type flag set indicating the routes that have been unselected
info MediaRouter.RouteInfo: Route that has been unselected for the given route types

onRouteVolumeChanged

Added in API level 16
void onRouteVolumeChanged (MediaRouter router, 
                MediaRouter.RouteInfo info)

当路线的音量变化时调用。

Parameters
router MediaRouter: the MediaRouter reporting the event
info MediaRouter.RouteInfo: The route with altered volume

Hooray!