Most visited

Recently visited

Added in API level 24

TvInputInfo.Builder

public static final class TvInputInfo.Builder
extends Object

java.lang.Object
   ↳ android.media.tv.TvInputInfo.Builder


用于创建 TvInputInfo对象的便捷构建器。

Summary

Public constructors

TvInputInfo.Builder(Context context, ComponentName component)

TvInputInfo构建一个新的构建器。

Public methods

TvInputInfo build()

用指定的字段创建一个 TvInputInfo实例。

TvInputInfo.Builder setCanRecord(boolean canRecord)

设置此电视输入是否可以录制电视节目。

TvInputInfo.Builder setExtras(Bundle extras)

设置与此电视输入关联的特定于域的附加内容。

TvInputInfo.Builder setTunerCount(int tunerCount)

设置调谐器计数。

Inherited methods

From class java.lang.Object

Public constructors

TvInputInfo.Builder

Added in API level 24
TvInputInfo.Builder (Context context, 
                ComponentName component)

TvInputInfo构建一个新的构建器。

Parameters
context Context: A Context of the application package implementing this class.
component ComponentName: The name of the application component to be used for the TvInputService.

Public methods

build

Added in API level 24
TvInputInfo build ()

用指定的字段创建一个TvInputInfo实例。 大多数的信息是通过解析AndroidManifest并获得SERVICE_META_DATATvInputService这款电视输入实现。

Returns
TvInputInfo TvInputInfo containing information about this TV input.

setCanRecord

Added in API level 24
TvInputInfo.Builder setCanRecord (boolean canRecord)

设置此电视输入是否可以录制电视节目。

Parameters
canRecord boolean: Whether this TV input can record TV programs.
Returns
TvInputInfo.Builder This Builder object to allow for chaining of calls to builder methods.

setExtras

Added in API level 24
TvInputInfo.Builder setExtras (Bundle extras)

设置与此电视输入关联的特定于域的附加内容。

Parameters
extras Bundle: Domain-specific extras associated with this TV input. Keys must be a scoped name, i.e. prefixed with a package name you own, so that different developers will not create conflicting keys.
Returns
TvInputInfo.Builder This Builder object to allow for chaining of calls to builder methods.

setTunerCount

Added in API level 24
TvInputInfo.Builder setTunerCount (int tunerCount)

设置调谐器计数。 仅适用于TYPE_TUNER

Parameters
tunerCount int: The number of tuners this TV input has.
Returns
TvInputInfo.Builder This Builder object to allow for chaining of calls to builder methods.

Hooray!