Most visited

Recently visited

Added in API level 16

MediaRouter.RouteCategory

public static class MediaRouter.RouteCategory
extends Object

java.lang.Object
    android.media.MediaRouter.RouteCategory


一类路线的定义。 所有路线都属于一个类别。

摘要(Summary)

公共方法(Public methods)

CharSequence getName()
CharSequence getName(Context context)

返回此RouteCategory的正确本地化/配置相关的名称。

List<MediaRouter.RouteInfo> getRoutes(List<MediaRouter.RouteInfo> out)

返回已添加到MediaRouter的此类别中的当前路由列表。

int getSupportedTypes()
boolean isGroupable()

返回这个类别是否支持分组。

String toString()

返回对象的字符串表示形式。

继承方法(Inherited methods)

From class java.lang.Object

公共方法(Public methods)

getName

Added in API level 16
CharSequence getName ()

返回(Returns)
CharSequence the name of this route category

getName

Added in API level 16
CharSequence getName (Context context)

返回此RouteCategory的正确本地化/配置相关的名称。

参数(Parameters)
context Context: Context to resolve name resources
返回(Returns)
CharSequence the name of this route category

getRoutes

Added in API level 16
List<MediaRouter.RouteInfo> getRoutes (List<MediaRouter.RouteInfo> out)

返回已添加到MediaRouter的此类别中的当前路由列表。

此列表将不包括嵌套在RouteGroups中的路由。 RouteGroup在其类别中被视为单个路由。

参数(Parameters)
out List: a List to fill with the routes in this category. If this parameter is non-null, it will be cleared, filled with the current routes with this category, and returned. If this parameter is null, a new List will be allocated to report the category's current routes.
返回(Returns)
List<MediaRouter.RouteInfo> A list with the routes in this category that have been added to the MediaRouter.

getSupportedTypes

Added in API level 16
int getSupportedTypes ()

返回(Returns)
int Flag set describing the route types supported by this category

isGroupable

Added in API level 16
boolean isGroupable ()

返回这个类别是否支持分组。

如果此方法返回true,则通过调用 getRouteAt(int)从此类别获得的所有路由将为 MediaRouter.RouteGroup

返回(Returns)
boolean true if this category supports

toString

Added in API level 16
String toString ()

返回对象的字符串表示形式。 通常, toString方法返回一个“文本表示”该对象的字符串。 结果应该是一个简洁但内容丰富的表述,对于一个人来说很容易阅读。 建议所有子类重写此方法。

ObjecttoString方法返回一个字符串,其中包含对象为实例的类的名称,符号字符“ @ ”以及对象的哈希代码的无符号十六进制表示形式。 换句话说,这个方法返回一个字符串,其值等于:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
 

返回(Returns)
String a string representation of the object.

Hooray!