docs/doc/reference/com/google/android/exoplayer2/ui/CaptionStyleCompat.html
Package com.google.android.exoplayer2.ui
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classCaptionStyleCompatextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")
Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
A compatibility wrapper for CaptioningManager.CaptionStyle.
Nested Classes | Modifier and Type | Class | Description |
| --- | --- | --- |
| static interface | CaptionStyleCompat.EdgeType |
Deprecated.
The type of edge, which may be none. |
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| int | backgroundColor |
Deprecated.
The preferred background color.
|
| static CaptionStyleCompat | DEFAULT |
Deprecated.
Default caption style.
|
| static int | EDGE_TYPE_DEPRESSED |
Deprecated.
Edge type value specifying depressed bevel character edges.
|
| static int | EDGE_TYPE_DROP_SHADOW |
Deprecated.
Edge type value specifying drop-shadowed character edges.
|
| static int | EDGE_TYPE_NONE |
Deprecated.
Edge type value specifying no character edges.
|
| static int | EDGE_TYPE_OUTLINE |
Deprecated.
Edge type value specifying uniformly outlined character edges.
|
| static int | EDGE_TYPE_RAISED |
Deprecated.
Edge type value specifying raised bevel character edges.
|
| int | edgeColor |
Deprecated.
The preferred edge color, if using an edge type other than EDGE_TYPE_NONE.
|
| @com.google.android.exoplayer2.ui.CaptionStyleCompat.EdgeType int | edgeType |
Deprecated.
The preferred edge type.
|
| int | foregroundColor |
Deprecated.
The preferred foreground color.
|
| Typeface | typeface |
Deprecated.
The preferred typeface, or null if unspecified.
|
| static int | USE_TRACK_COLOR_SETTINGS |
Deprecated.
Use color setting specified by the track and fallback to default caption style.
|
| int | windowColor |
Deprecated.
The preferred window color. |
Constructors | Constructor | Description |
| --- | --- |
| CaptionStyleCompat(int foregroundColor, int backgroundColor, int windowColor, @com.google.android.exoplayer2.ui.CaptionStyleCompat.EdgeType int edgeType, int edgeColor, Typeface typeface) |
Deprecated.
|
All Methods Static Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| static CaptionStyleCompat | createFromCaptionStyle(CaptioningManager.CaptionStyle captionStyle) |
Deprecated.
Creates a CaptionStyleCompat equivalent to a provided CaptioningManager.CaptionStyle.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public static final int EDGE_TYPE_NONE
Deprecated.
Edge type value specifying no character edges. See Also:Constant Field Values
-
public static final int EDGE_TYPE_OUTLINE
Deprecated.
Edge type value specifying uniformly outlined character edges. See Also:Constant Field Values
-
public static final int EDGE_TYPE_DROP_SHADOW
Deprecated.
Edge type value specifying drop-shadowed character edges. See Also:Constant Field Values
-
public static final int EDGE_TYPE_RAISED
Deprecated.
Edge type value specifying raised bevel character edges. See Also:Constant Field Values
-
public static final int EDGE_TYPE_DEPRESSED
Deprecated.
Edge type value specifying depressed bevel character edges. See Also:Constant Field Values
-
public static final int USE_TRACK_COLOR_SETTINGS
Deprecated.
Use color setting specified by the track and fallback to default caption style. See Also:Constant Field Values
-
public static final[CaptionStyleCompat](CaptionStyleCompat.html "class in com.google.android.exoplayer2.ui")DEFAULT
Deprecated.
Default caption style.
-
public final int foregroundColor
Deprecated.
The preferred foreground color.
-
public final int backgroundColor
Deprecated.
The preferred background color.
-
public final int windowColor
Deprecated.
The preferred window color.
-
public final @com.google.android.exoplayer2.ui.CaptionStyleCompat.EdgeType int edgeType
Deprecated.
The preferred edge type. One of:
- EDGE_TYPE_NONE
- EDGE_TYPE_OUTLINE
- EDGE_TYPE_DROP_SHADOW
- EDGE_TYPE_RAISED
- EDGE_TYPE_DEPRESSED
-
public final int edgeColor
Deprecated.
The preferred edge color, if using an edge type other than EDGE_TYPE_NONE.
-
@Nullable
public final[Typeface](https://developer.android.com/reference/android/graphics/Typeface.html "class or interface in android.graphics")typeface
Deprecated.
The preferred typeface, or null if unspecified.
-
public CaptionStyleCompat(int foregroundColor,
int backgroundColor,
int windowColor,
@com.google.android.exoplayer2.ui.CaptionStyleCompat.EdgeType int edgeType,
int edgeColor,
@Nullable[Typeface](https://developer.android.com/reference/android/graphics/Typeface.html "class or interface in android.graphics")typeface)
Deprecated.
Parameters:foregroundColor - See foregroundColor.backgroundColor - See backgroundColor.windowColor - See windowColor.edgeType - See edgeType.edgeColor - See edgeColor.typeface - See typeface.
-
@RequiresApi(19)
public static[CaptionStyleCompat](CaptionStyleCompat.html "class in com.google.android.exoplayer2.ui")createFromCaptionStyle([CaptioningManager.CaptionStyle](https://developer.android.com/reference/android/view/accessibility/CaptioningManager.CaptionStyle.html "class or interface in android.view.accessibility")captionStyle)
Deprecated.
Creates a CaptionStyleCompat equivalent to a provided CaptioningManager.CaptionStyle.
Parameters:captionStyle - A CaptioningManager.CaptionStyle.Returns:The equivalent CaptionStyleCompat.