java.lang.Object | |
↳ | com.google.android.gms.cast.TextTrackStyle |
A class that specifies how a text track's text will be displayed on-screen. The text is displayed inside a rectangular "window". The appearance of both the text and the window are configurable.
With the exception of the font scale, which has a predefined default value, any attribute that is not explicitly set will remain "unspecified", and the Cast Receiver will select an appropriate value.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | COLOR_UNSPECIFIED | A color value that indicates an unspecified (unset) color. | |||||||||
float | DEFAULT_FONT_SCALE | The default font scale. | |||||||||
int | EDGE_TYPE_DEPRESSED | An edge type indicating a depressed edge. | |||||||||
int | EDGE_TYPE_DROP_SHADOW | An edge type indicating a drop shadow edge. | |||||||||
int | EDGE_TYPE_NONE | An edge type indicating no edge. | |||||||||
int | EDGE_TYPE_OUTLINE | An edge type indicating an outline edge. | |||||||||
int | EDGE_TYPE_RAISED | An edge type indicating a raised edge. | |||||||||
int | EDGE_TYPE_UNSPECIFIED | An edge type indicating an unspecified edge type. | |||||||||
int | FONT_FAMILY_CASUAL | A font family indicating Casual. | |||||||||
int | FONT_FAMILY_CURSIVE | A font family indicating Cursive. | |||||||||
int | FONT_FAMILY_MONOSPACED_SANS_SERIF | A font family indicating Monospaced Sans Serif. | |||||||||
int | FONT_FAMILY_MONOSPACED_SERIF | A font family indicating Monospaced Serif. | |||||||||
int | FONT_FAMILY_SANS_SERIF | A font family indicating Sans Serif. | |||||||||
int | FONT_FAMILY_SERIF | A font family indicating Serif. | |||||||||
int | FONT_FAMILY_SMALL_CAPITALS | A font family indicating Small Capitals. | |||||||||
int | FONT_FAMILY_UNSPECIFIED | A font family indicating an unspecified font family. | |||||||||
int | FONT_STYLE_BOLD | A font style indicating a bold style. | |||||||||
int | FONT_STYLE_BOLD_ITALIC | A font style indicating a bold and italic style. | |||||||||
int | FONT_STYLE_ITALIC | A font style indicating an italic style. | |||||||||
int | FONT_STYLE_NORMAL | A font style indicating a normal style. | |||||||||
int | FONT_STYLE_UNSPECIFIED | A font style indicating an unspecified style. | |||||||||
int | WINDOW_TYPE_NONE | A window type indicating no window type. | |||||||||
int | WINDOW_TYPE_NORMAL | A window type indicating a normal window. | |||||||||
int | WINDOW_TYPE_ROUNDED | A window type indicating a window with rounded corners. | |||||||||
int | WINDOW_TYPE_UNSPECIFIED | A window type indicating an unspecified window type. |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new TextTrackStyle.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new TextTrackStyle based on the system's current closed caption style settings.
| |||||||||||
Gets the text's background color.
| |||||||||||
Gets the custom data object.
| |||||||||||
Gets the window's edge color.
| |||||||||||
Gets the caption window's edge type.
| |||||||||||
Gets the text's font family.
| |||||||||||
Gets the text's generic font family.
| |||||||||||
Gets the font scale factor.
| |||||||||||
Gets the text font style.
| |||||||||||
Gets the text's foreground color.
| |||||||||||
Gets the window's color.
| |||||||||||
Gets the window corner radius.
| |||||||||||
Gets the caption window type.
| |||||||||||
Sets the text's background color.
| |||||||||||
Sets the custom data object.
| |||||||||||
Sets the window's edge color.
| |||||||||||
Sets the caption window's edge type.
| |||||||||||
Sets the text's font family.
| |||||||||||
Sets the text's generic font family.
| |||||||||||
Sets the font scale factor.
| |||||||||||
Sets the text font style.
| |||||||||||
Sets the text's foreground color.
| |||||||||||
Sets the window's color.
| |||||||||||
If the window type is
WINDOW_TYPE_ROUNDED , sets the radius for the window's
corners. | |||||||||||
Sets the window type.
| |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
A color value that indicates an unspecified (unset) color.
The default font scale.
An edge type indicating a depressed edge.
An edge type indicating a drop shadow edge.
An edge type indicating no edge.
An edge type indicating an outline edge.
An edge type indicating a raised edge.
An edge type indicating an unspecified edge type.
A font family indicating Casual.
A font family indicating Cursive.
A font family indicating Monospaced Sans Serif.
A font family indicating Monospaced Serif.
A font family indicating Sans Serif.
A font family indicating Serif.
A font family indicating Small Capitals.
A font family indicating an unspecified font family.
A font style indicating a bold style.
A font style indicating a bold and italic style.
A font style indicating an italic style.
A font style indicating a normal style.
A font style indicating an unspecified style.
A window type indicating no window type.
A window type indicating a normal window.
A window type indicating a window with rounded corners.
A window type indicating an unspecified window type.
Constructs a new TextTrackStyle.
Parameters | |
---|---|
other |
Object
|
Returns | |
---|---|
boolean |
Constructs a new TextTrackStyle based on the system's current closed caption style settings. On platform levels below 19, this returns an object with "unspecified" values for all fields.
Parameters | |
---|---|
context |
Context :
The calling context. |
Returns | |
---|---|
TextTrackStyle |
The new TextTrackStyle. |
Gets the text's background color.
Returns | |
---|---|
int |
Gets the custom data object.
Returns | |
---|---|
JSONObject |
Gets the window's edge color.
Returns | |
---|---|
int |
Gets the caption window's edge type.
Returns | |
---|---|
int |
Gets the text's font family.
Returns | |
---|---|
String |
Gets the text's generic font family.
Returns | |
---|---|
int |
Gets the font scale factor.
Returns | |
---|---|
float |
Gets the text font style.
Returns | |
---|---|
int |
Gets the text's foreground color.
Returns | |
---|---|
int |
Gets the window's color.
Returns | |
---|---|
int |
Gets the window corner radius.
Returns | |
---|---|
int |
Gets the caption window type.
Returns | |
---|---|
int |
Returns | |
---|---|
int |
Sets the text's background color.
Parameters | |
---|---|
backgroundColor |
int :
The color, as an ARGB value.
|
Sets the custom data object.
Parameters | |
---|---|
customData |
JSONObject
|
Sets the window's edge color.
Parameters | |
---|---|
edgeColor |
int :
The color, as an ARGB value.
|
Sets the caption window's edge type.
Parameters | |
---|---|
edgeType |
int :
The edge type; one of the EDGE_TYPE_ constants defined above.
|
Sets the text's font family.
Parameters | |
---|---|
fontFamily |
String :
The text font family.
|
Sets the text's generic font family. This will be used if the font family specified with
setFontFamily(String)
(if any) is unavailable.
Parameters | |
---|---|
fontGenericFamily |
int :
The generic family; one of the FONT_FAMILY_ constants
defined above.
|
Sets the font scale factor. The default is DEFAULT_FONT_SCALE
.
Parameters | |
---|---|
fontScale |
float
|
Sets the text font style.
Parameters | |
---|---|
fontStyle |
int :
The font style; one of the FONT_STYLE_ constants defined above.
|
Sets the text's foreground color.
Parameters | |
---|---|
foregroundColor |
int :
The color, as an ARGB value.
|
Sets the window's color.
Parameters | |
---|---|
windowColor |
int :
The color, as an ARGB value.
|
If the window type is WINDOW_TYPE_ROUNDED
, sets the radius for the window's
corners.
Parameters | |
---|---|
windowCornerRadius |
int :
The radius, in pixels. Must be a positive value.
|
Sets the window type.
Parameters | |
---|---|
windowType |
int :
The window type; one of the WINDOW_TYPE_ constants defined above.
|
Parameters | |
---|---|
out |
Parcel
|
flags |
int
|