CaptionStyleCompat
@UnstableApi
public final class CaptionStyleCompat
A compatibility wrapper for CaptionStyle.
Summary
Nested types |
|---|
@DocumentedThe type of edge, which may be none. |
Constants |
|
|---|---|
static final CaptionStyleCompat |
Default caption style. |
static final int |
Edge type value specifying depressed bevel character edges. |
static final int |
Edge type value specifying drop-shadowed character edges. |
static final int |
EDGE_TYPE_NONE = 0Edge type value specifying no character edges. |
static final int |
Edge type value specifying uniformly outlined character edges. |
static final int |
EDGE_TYPE_RAISED = 3Edge type value specifying raised bevel character edges. |
static final int |
Use color setting specified by the track and fallback to default caption style. |
Public fields |
|
|---|---|
final int |
The preferred background color. |
final int |
The preferred edge color, if using an edge type other than |
final int |
The preferred edge type. |
final int |
The preferred foreground color. |
final @Nullable Typeface |
The preferred typeface, or |
final int |
The preferred window color. |
Public constructors |
|---|
CaptionStyleCompat( |
Public methods |
|
|---|---|
static CaptionStyleCompat |
createFromCaptionStyle(CaptioningManager.CaptionStyle captionStyle)Creates a |
Constants
EDGE_TYPE_DEPRESSED
public static final int EDGE_TYPE_DEPRESSED = 4
Edge type value specifying depressed bevel character edges.
EDGE_TYPE_DROP_SHADOW
public static final int EDGE_TYPE_DROP_SHADOW = 2
Edge type value specifying drop-shadowed character edges.
EDGE_TYPE_NONE
public static final int EDGE_TYPE_NONE = 0
Edge type value specifying no character edges.
EDGE_TYPE_OUTLINE
public static final int EDGE_TYPE_OUTLINE = 1
Edge type value specifying uniformly outlined character edges.
EDGE_TYPE_RAISED
public static final int EDGE_TYPE_RAISED = 3
Edge type value specifying raised bevel character edges.
USE_TRACK_COLOR_SETTINGS
public static final int USE_TRACK_COLOR_SETTINGS = 1
Use color setting specified by the track and fallback to default caption style.
Public fields
edgeColor
public final int edgeColor
The preferred edge color, if using an edge type other than EDGE_TYPE_NONE.
Public constructors
CaptionStyleCompat
public CaptionStyleCompat(
int foregroundColor,
int backgroundColor,
int windowColor,
@CaptionStyleCompat.EdgeType int edgeType,
int edgeColor,
@Nullable Typeface typeface
)
| Parameters | |
|---|---|
int foregroundColor |
See |
int backgroundColor |
See |
int windowColor |
See |
@CaptionStyleCompat.EdgeType int edgeType |
See |
int edgeColor |
See |
@Nullable Typeface typeface |
See |
Public methods
createFromCaptionStyle
public static CaptionStyleCompat createFromCaptionStyle(CaptioningManager.CaptionStyle captionStyle)
Creates a CaptionStyleCompat equivalent to a provided CaptionStyle.
| Parameters | |
|---|---|
CaptioningManager.CaptionStyle captionStyle |
A |
| Returns | |
|---|---|
CaptionStyleCompat |
The equivalent |