docs/doc/reference/com/google/android/exoplayer2/text/Cue.html
Package com.google.android.exoplayer2.text
All Implemented Interfaces:Bundleable
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classCueextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[Bundleable](../Bundleable.html "interface in com.google.android.exoplayer2")
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.
Contains information about a specific cue, including textual content and formatting data.
Nested Classes | Modifier and Type | Class | Description |
| --- | --- | --- |
| static interface | Cue.AnchorType |
Deprecated.
The type of anchor, which may be unset.
|
| static class | Cue.Builder |
Deprecated.
A builder for Cue objects.
|
| static interface | Cue.LineType |
Deprecated.
The type of line, which may be unset.
|
| static interface | Cue.TextSizeType |
Deprecated.
The type of default text size for this cue, which may be unset.
|
| static interface | Cue.VerticalType |
Deprecated.
The type of vertical layout for this cue, which may be unset (i.e. |
-
Bundleable.Creator<T extends Bundleable>
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| static int | ANCHOR_TYPE_END |
Deprecated.
Anchors the right (for horizontal positions) or bottom (for vertical positions) edge of the cue box.
|
| static int | ANCHOR_TYPE_MIDDLE |
Deprecated.
Anchors the middle of the cue box.
|
| static int | ANCHOR_TYPE_START |
Deprecated.
Anchors the left (for horizontal positions) or top (for vertical positions) edge of the cue box.
|
| Bitmap | bitmap |
Deprecated.
The cue image, or null if this is a text cue.
|
| float | bitmapHeight |
Deprecated.
The bitmap height as a fraction of the of the viewport size, or DIMEN_UNSET if the bitmap should be displayed at its natural height given the bitmap dimensions and the specified size.
|
| static Bundleable.Creator<Cue> | CREATOR |
Deprecated.
|
| static float | DIMEN_UNSET |
Deprecated.
An unset position, width or size.
|
| static Cue | EMPTY |
Deprecated.
The empty cue.
|
| float | line |
Deprecated.
The position of the cue box within the viewport in the direction orthogonal to the writing direction (determined by verticalType), or DIMEN_UNSET.
|
| static int | LINE_TYPE_FRACTION |
Deprecated.
Value for lineType when line is a fractional position.
|
| static int | LINE_TYPE_NUMBER |
Deprecated.
Value for lineType when line is a line number.
|
| @com.google.android.exoplayer2.text.Cue.AnchorType int | lineAnchor |
Deprecated.
The cue box anchor positioned by line when lineType is LINE_TYPE_FRACTION.
|
| @com.google.android.exoplayer2.text.Cue.LineType int | lineType |
Deprecated.
The type of the line value.
|
| Layout.Alignment | multiRowAlignment |
Deprecated.
The alignment of multiple lines of text relative to the longest line, or null if the alignment is undefined.
|
| float | position |
Deprecated.
The fractional position of the positionAnchor of the cue box within the viewport in the direction orthogonal to line, or DIMEN_UNSET.
|
| @com.google.android.exoplayer2.text.Cue.AnchorType int | positionAnchor |
Deprecated.
The cue box anchor positioned by position.
|
| float | shearDegrees |
Deprecated.
The shear angle in degrees to be applied to this Cue, expressed in graphics coordinates.
|
| float | size |
Deprecated.
The size of the cue box in the writing direction specified as a fraction of the viewport size in that direction, or DIMEN_UNSET.
|
| CharSequence | text |
Deprecated.
The cue text, or null if this is an image cue.
|
| static int | TEXT_SIZE_TYPE_ABSOLUTE |
Deprecated.
Text size is measured in number of pixels.
|
| static int | TEXT_SIZE_TYPE_FRACTIONAL |
Deprecated.
Text size is measured as a fraction of the viewport size minus the view padding.
|
| static int | TEXT_SIZE_TYPE_FRACTIONAL_IGNORE_PADDING |
Deprecated.
Text size is measured as a fraction of the viewport size, ignoring the view padding
|
| Layout.Alignment | textAlignment |
Deprecated.
The alignment of the cue text within the cue box, or null if the alignment is undefined.
|
| float | textSize |
Deprecated.
The default text size for this cue's text, or DIMEN_UNSET if this cue has no default text size.
|
| @com.google.android.exoplayer2.text.Cue.TextSizeType int | textSizeType |
Deprecated.
The default text size type for this cue's text, or TYPE_UNSET if this cue has no default text size.
|
| static int | TYPE_UNSET |
Deprecated.
An unset anchor, line, text size or vertical type value.
|
| static int | VERTICAL_TYPE_LR |
Deprecated.
Vertical left-to-right (e.g.
|
| static int | VERTICAL_TYPE_RL |
Deprecated.
Vertical right-to-left (e.g.
|
| @com.google.android.exoplayer2.text.Cue.VerticalType int | verticalType |
Deprecated.
The vertical formatting of this Cue, or TYPE_UNSET if the cue has no vertical setting (and so should be horizontal).
|
| int | windowColor |
Deprecated.
The fill color of the window.
|
| boolean | windowColorSet |
Deprecated.
Specifies whether or not the windowColor property is set.
|
All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| Cue.Builder | buildUpon() |
Deprecated.
Returns a new Cue.Builder initialized with the same values as this Cue.
|
| boolean | equals(Object obj) |
Deprecated.
|
| int | hashCode() |
Deprecated.
|
| Bundle | toBundle() |
Deprecated.
Returns a Bundle representing the information stored in this object.
|
-
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
public static final[Cue](Cue.html "class in com.google.android.exoplayer2.text")EMPTY
Deprecated.
The empty cue.
-
public static final float DIMEN_UNSET
Deprecated.
An unset position, width or size. See Also:Constant Field Values
-
public static final int TYPE_UNSET
Deprecated.
An unset anchor, line, text size or vertical type value. See Also:Constant Field Values
-
public static final int ANCHOR_TYPE_START
Deprecated.
Anchors the left (for horizontal positions) or top (for vertical positions) edge of the cue box. See Also:Constant Field Values
-
public static final int ANCHOR_TYPE_MIDDLE
Deprecated.
Anchors the middle of the cue box. See Also:Constant Field Values
-
public static final int ANCHOR_TYPE_END
Deprecated.
Anchors the right (for horizontal positions) or bottom (for vertical positions) edge of the cue box. See Also:Constant Field Values
-
public static final int LINE_TYPE_FRACTION
Deprecated.
Value for lineType when line is a fractional position.
See Also:Constant Field Values
-
public static final int LINE_TYPE_NUMBER
Deprecated.
Value for lineType when line is a line number.
See Also:Constant Field Values
-
public static final int TEXT_SIZE_TYPE_FRACTIONAL
Deprecated.
Text size is measured as a fraction of the viewport size minus the view padding. See Also:Constant Field Values
-
public static final int TEXT_SIZE_TYPE_FRACTIONAL_IGNORE_PADDING
Deprecated.
Text size is measured as a fraction of the viewport size, ignoring the view padding See Also:Constant Field Values
-
public static final int TEXT_SIZE_TYPE_ABSOLUTE
Deprecated.
Text size is measured in number of pixels. See Also:Constant Field Values
-
public static final int VERTICAL_TYPE_RL
Deprecated.
Vertical right-to-left (e.g. for Japanese). See Also:Constant Field Values
-
public static final int VERTICAL_TYPE_LR
Deprecated.
Vertical left-to-right (e.g. for Mongolian). See Also:Constant Field Values
-
@Nullable
public final[CharSequence](https://developer.android.com/reference/java/lang/CharSequence.html "class or interface in java.lang")text
Deprecated.
The cue text, or null if this is an image cue. Note the CharSequence may be decorated with styling spans.
-
@Nullable
public final[Layout.Alignment](https://developer.android.com/reference/android/text/Layout.Alignment.html "class or interface in android.text")textAlignment
Deprecated.
The alignment of the cue text within the cue box, or null if the alignment is undefined.
-
@Nullable
public final[Layout.Alignment](https://developer.android.com/reference/android/text/Layout.Alignment.html "class or interface in android.text")multiRowAlignment
Deprecated.
The alignment of multiple lines of text relative to the longest line, or null if the alignment is undefined.
-
@Nullable
public final[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html "class or interface in android.graphics")bitmap
Deprecated.
The cue image, or null if this is a text cue.
-
public final float line
Deprecated.
The position of the cue box within the viewport in the direction orthogonal to the writing direction (determined by verticalType), or DIMEN_UNSET. When set, the interpretation of the value depends on the value of lineType.
The measurement direction depends on verticalType:
- For [`TYPE_UNSET`](#TYPE_UNSET) (i.e. horizontal), this is the vertical position relative to the top of the viewport.
- For [`VERTICAL_TYPE_LR`](#VERTICAL_TYPE_LR) this is the horizontal position relative to the left of the viewport.
- For [`VERTICAL_TYPE_RL`](#VERTICAL_TYPE_RL) this is the horizontal position relative to the right of the viewport.
-
[@LineType](Cue.LineType.html "annotation in com.google.android.exoplayer2.text")public final @com.google.android.exoplayer2.text.Cue.LineType int lineType
Deprecated.
The type of the line value.
- LINE_TYPE_FRACTION indicates that line is a fractional position within the viewport (measured to the part of the cue box determined by lineAnchor).
- LINE_TYPE_NUMBER indicates that line is a viewport line number. The viewport is divided into lines (each equal in size to the first line of the cue box). The cue box is positioned to align with the viewport lines as follows:
- lineAnchor) is ignored.
- When line is greater than or equal to 0 the first line in the cue box is aligned with a viewport line, with 0 meaning the first line of the viewport.
- When line is negative the last line in the cue box is aligned with a viewport line, with -1 meaning the last line of the viewport.
- For horizontal text the start and end of the viewport are the top and bottom respectively.
-
[@AnchorType](Cue.AnchorType.html "annotation in com.google.android.exoplayer2.text")public final @com.google.android.exoplayer2.text.Cue.AnchorType int lineAnchor
Deprecated.
The cue box anchor positioned by line when lineType is LINE_TYPE_FRACTION.
One of:
- [`ANCHOR_TYPE_START`](#ANCHOR_TYPE_START)
- [`ANCHOR_TYPE_MIDDLE`](#ANCHOR_TYPE_MIDDLE)
- [`ANCHOR_TYPE_END`](#ANCHOR_TYPE_END)
- [`TYPE_UNSET`](#TYPE_UNSET)
For the normal case of horizontal text, ANCHOR_TYPE_START, ANCHOR_TYPE_MIDDLE and ANCHOR_TYPE_END correspond to the top, middle and bottom of the cue box respectively.
-
public final float position
Deprecated.
The fractional position of the positionAnchor of the cue box within the viewport in the direction orthogonal to line, or DIMEN_UNSET.
The measurement direction depends on verticalType.
- For [`TYPE_UNSET`](#TYPE_UNSET) (i.e. horizontal), this is the horizontal position relative to the left of the viewport. Note that positioning is relative to the left of the viewport even in the case of right-to-left text.
- For [`VERTICAL_TYPE_LR`](#VERTICAL_TYPE_LR) and [`VERTICAL_TYPE_RL`](#VERTICAL_TYPE_RL) (i.e. vertical), this is the vertical position relative to the top of the viewport.
-
[@AnchorType](Cue.AnchorType.html "annotation in com.google.android.exoplayer2.text")public final @com.google.android.exoplayer2.text.Cue.AnchorType int positionAnchor
Deprecated.
The cue box anchor positioned by position. One of ANCHOR_TYPE_START, ANCHOR_TYPE_MIDDLE, ANCHOR_TYPE_END and TYPE_UNSET.
For the normal case of horizontal text, ANCHOR_TYPE_START, ANCHOR_TYPE_MIDDLE and ANCHOR_TYPE_END correspond to the left, middle and right of the cue box respectively.
-
public final float size
Deprecated.
The size of the cue box in the writing direction specified as a fraction of the viewport size in that direction, or DIMEN_UNSET.
-
public final float bitmapHeight
Deprecated.
The bitmap height as a fraction of the of the viewport size, or DIMEN_UNSET if the bitmap should be displayed at its natural height given the bitmap dimensions and the specified size.
-
public final boolean windowColorSet
Deprecated.
Specifies whether or not the windowColor property is set.
-
public final int windowColor
Deprecated.
The fill color of the window.
-
[@TextSizeType](Cue.TextSizeType.html "annotation in com.google.android.exoplayer2.text")public final @com.google.android.exoplayer2.text.Cue.TextSizeType int textSizeType
Deprecated.
The default text size type for this cue's text, or TYPE_UNSET if this cue has no default text size.
-
public final float textSize
Deprecated.
The default text size for this cue's text, or DIMEN_UNSET if this cue has no default text size.
-
[@VerticalType](Cue.VerticalType.html "annotation in com.google.android.exoplayer2.text")public final @com.google.android.exoplayer2.text.Cue.VerticalType int verticalType
Deprecated.
The vertical formatting of this Cue, or TYPE_UNSET if the cue has no vertical setting (and so should be horizontal).
-
public final float shearDegrees
Deprecated.
The shear angle in degrees to be applied to this Cue, expressed in graphics coordinates. This results in a skew transform for the block along the inline progression axis.
-
public static final[Bundleable.Creator](../Bundleable.Creator.html "interface in com.google.android.exoplayer2")<[Cue](Cue.html "class in com.google.android.exoplayer2.text")> CREATOR
Deprecated.
-
public[Cue.Builder](Cue.Builder.html "class in com.google.android.exoplayer2.text")buildUpon()
Deprecated.
Returns a new Cue.Builder initialized with the same values as this Cue.
-
public boolean equals(@Nullable[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")obj)
Deprecated.
Overrides:equals in class Object
-
public int hashCode()
Deprecated.
Overrides:hashCode in class Object
-
public[Bundle](https://developer.android.com/reference/android/os/Bundle.html "class or interface in android.os")toBundle()
Deprecated.
Description copied from interface: Bundleable
Returns a Bundle representing the information stored in this object.
Specified by:toBundle in interface Bundleable