Most visited

Recently visited

Added in API level 19

CaptioningManager.CaptionStyle

public static final class CaptioningManager.CaptionStyle
extends Object

java.lang.Object
   ↳ android.view.accessibility.CaptioningManager.CaptionStyle


指定视频标题的视觉属性,包括前景和背景颜色,边缘属性和字体。

Summary

Constants

int EDGE_TYPE_DEPRESSED

边缘类型值指定凹陷的斜角字符边缘。

int EDGE_TYPE_DROP_SHADOW

边缘类型值指定放映阴影字符边缘。

int EDGE_TYPE_NONE

边缘类型值指定没有字符边缘。

int EDGE_TYPE_OUTLINE

边缘类型值指定均匀轮廓的字符边缘。

int EDGE_TYPE_RAISED

指定凸起斜角字符边缘的边缘类型值。

int EDGE_TYPE_UNSPECIFIED

未指定的边缘类型值。

Fields

public final int backgroundColor

视频字幕的首选背景颜色。

public final int edgeColor

如果使用非 EDGE_TYPE_NONE以外的边缘类型,视频字幕的首选边缘颜色。

public final int edgeType

视频字幕的首选边缘类型,其中一种:

public final int foregroundColor

视频字幕的首选前景色。

public final int windowColor

视频字幕的首选窗口颜色。

Public methods

Typeface getTypeface()
boolean hasBackgroundColor()
boolean hasEdgeColor()
boolean hasEdgeType()
boolean hasForegroundColor()
boolean hasWindowColor()

Inherited methods

From class java.lang.Object

Constants

EDGE_TYPE_DEPRESSED

Added in API level 21
int EDGE_TYPE_DEPRESSED

边缘类型值指定凹陷的斜角字符边缘。

常量值:4(0x00000004)

EDGE_TYPE_DROP_SHADOW

Added in API level 19
int EDGE_TYPE_DROP_SHADOW

边缘类型值指定放映阴影字符边缘。

常量值:2(0x00000002)

EDGE_TYPE_NONE

Added in API level 19
int EDGE_TYPE_NONE

边缘类型值指定没有字符边缘。

常量值:0(0x00000000)

EDGE_TYPE_OUTLINE

Added in API level 19
int EDGE_TYPE_OUTLINE

边缘类型值指定均匀轮廓的字符边缘。

常数值:1(0x00000001)

EDGE_TYPE_RAISED

Added in API level 21
int EDGE_TYPE_RAISED

指定凸起斜角字符边缘的边缘类型值。

常量值:3(0x00000003)

EDGE_TYPE_UNSPECIFIED

Added in API level 21
int EDGE_TYPE_UNSPECIFIED

未指定的边缘类型值。

常量值:-1(0xffffffff)

Fields

backgroundColor

Added in API level 19
int backgroundColor

视频字幕的首选背景颜色。

edgeColor

Added in API level 19
int edgeColor

视频字幕的首选边缘颜色,如果使用的边缘类型不是 EDGE_TYPE_NONE

edgeType

Added in API level 19
int edgeType

视频字幕的首选边缘类型,其中一种:

foregroundColor

Added in API level 19
int foregroundColor

视频字幕的首选前景色。

windowColor

Added in API level 21
int windowColor

视频字幕的首选窗口颜色。

Public methods

getTypeface

Added in API level 19
Typeface getTypeface ()

Returns
Typeface the preferred Typeface for video captions, or null if not specified

hasBackgroundColor

Added in API level 21
boolean hasBackgroundColor ()

Returns
boolean true if the user has specified a background color that should override the application default, false otherwise

hasEdgeColor

Added in API level 21
boolean hasEdgeColor ()

Returns
boolean true if the user has specified an edge color that should override the application default, false otherwise

hasEdgeType

Added in API level 21
boolean hasEdgeType ()

Returns
boolean true if the user has specified an edge type that should override the application default, false otherwise

hasForegroundColor

Added in API level 21
boolean hasForegroundColor ()

Returns
boolean true if the user has specified a foreground color that should override the application default, false otherwise

hasWindowColor

Added in API level 21
boolean hasWindowColor ()

Returns
boolean true if the user has specified a window color that should override the application default, false otherwise

Hooray!