public static final class CaptioningManager.CaptionStyle extends Object
Modifier and Type | Field and Description |
---|---|
int |
backgroundColor
The preferred background color for video captions.
|
static int |
COLOR_UNSPECIFIED
Packed value for a color of 'default' and opacity of 100%.
|
static CaptioningManager.CaptionStyle |
DEFAULT
The default caption style used to fill in unspecified values.
|
static int |
EDGE_TYPE_DEPRESSED
Edge type value specifying depressed bevel character edges.
|
static int |
EDGE_TYPE_DROP_SHADOW
Edge type value specifying drop-shadowed character edges.
|
static int |
EDGE_TYPE_NONE
Edge type value specifying no character edges.
|
static int |
EDGE_TYPE_OUTLINE
Edge type value specifying uniformly outlined character edges.
|
static int |
EDGE_TYPE_RAISED
Edge type value specifying raised bevel character edges.
|
static int |
EDGE_TYPE_UNSPECIFIED
Unspecified edge type value.
|
int |
edgeColor
The preferred edge color for video captions, if using an edge type
other than
EDGE_TYPE_NONE . |
int |
edgeType
The preferred edge type for video captions, one of:
EDGE_TYPE_UNSPECIFIED
EDGE_TYPE_NONE
EDGE_TYPE_OUTLINE
EDGE_TYPE_DROP_SHADOW
EDGE_TYPE_RAISED
EDGE_TYPE_DEPRESSED
|
int |
foregroundColor
The preferred foreground color for video captions.
|
String |
mRawTypeface |
static int |
PRESET_CUSTOM |
static CaptioningManager.CaptionStyle[] |
PRESETS |
int |
windowColor
The preferred window color for video captions.
|
Modifier and Type | Method and Description |
---|---|
CaptioningManager.CaptionStyle |
applyStyle(CaptioningManager.CaptionStyle overlay)
Applies a caption style, overriding any properties that are specified
in the overlay caption.
|
static CaptioningManager.CaptionStyle |
getCustomStyle(ContentResolver cr) |
Typeface |
getTypeface() |
boolean |
hasBackgroundColor() |
static boolean |
hasColor(int packedColor)
Returns whether a packed color indicates a non-default value.
|
boolean |
hasEdgeColor() |
boolean |
hasEdgeType() |
boolean |
hasForegroundColor() |
boolean |
hasWindowColor() |
public static final int COLOR_UNSPECIFIED
public static final CaptioningManager.CaptionStyle DEFAULT
public static final CaptioningManager.CaptionStyle[] PRESETS
public static final int PRESET_CUSTOM
public static final int EDGE_TYPE_UNSPECIFIED
public static final int EDGE_TYPE_NONE
public static final int EDGE_TYPE_OUTLINE
public static final int EDGE_TYPE_DROP_SHADOW
public static final int EDGE_TYPE_RAISED
public static final int EDGE_TYPE_DEPRESSED
public final int foregroundColor
public final int backgroundColor
public final int edgeType
public final int edgeColor
EDGE_TYPE_NONE
.public final int windowColor
public final String mRawTypeface
public static boolean hasColor(int packedColor)
packedColor
- the packed color valuetrue
if a non-default value is specifiedpublic CaptioningManager.CaptionStyle applyStyle(CaptioningManager.CaptionStyle overlay)
overlay
- The style to applypublic boolean hasBackgroundColor()
true
if the user has specified a background color
that should override the application default, false
otherwisepublic boolean hasForegroundColor()
true
if the user has specified a foreground color
that should override the application default, false
otherwisepublic boolean hasEdgeType()
true
if the user has specified an edge type that
should override the application default, false
otherwisepublic boolean hasEdgeColor()
true
if the user has specified an edge color that
should override the application default, false
otherwisepublic boolean hasWindowColor()
true
if the user has specified a window color that
should override the application default, false
otherwisepublic Typeface getTypeface()
Typeface
for video captions, or null if
not specifiedpublic static CaptioningManager.CaptionStyle getCustomStyle(ContentResolver cr)