docs/doc/reference/com/google/android/exoplayer2/text/Cue.Builder.html
Package com.google.android.exoplayer2.text
Enclosing class:Cue
public static final classCue.Builderextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")
A builder for Cue objects.
Constructors | Constructor | Description |
| --- | --- |
| Builder() | |
All Methods Instance Methods Concrete Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| Cue | build() |
Build the cue.
|
| Cue.Builder | clearWindowColor() |
Sets Cue.windowColorSet to false.
|
| Bitmap | getBitmap() |
Gets the cue image.
|
| float | getBitmapHeight() |
Gets the bitmap height as a fraction of the viewport size.
|
| float | getLine() |
Gets the position of the lineAnchor of the cue box within the viewport in the direction orthogonal to the writing direction.
|
| @com.google.android.exoplayer2.text.Cue.AnchorType int | getLineAnchor() |
Gets the cue box anchor positioned by line.
|
| @com.google.android.exoplayer2.text.Cue.LineType int | getLineType() |
Gets the type of the value of getLine().
|
| float | getPosition() |
Gets the fractional position of the positionAnchor of the cue box within the viewport in the direction orthogonal to line.
|
| @com.google.android.exoplayer2.text.Cue.AnchorType int | getPositionAnchor() |
Gets the cue box anchor positioned by position.
|
| float | getSize() |
Gets the size of the cue box in the writing direction specified as a fraction of the viewport size in that direction.
|
| CharSequence | getText() |
Gets the cue text.
|
| Layout.Alignment | getTextAlignment() |
Gets the alignment of the cue text within the cue box, or null if the alignment is undefined.
|
| float | getTextSize() |
Gets the default text size for this cue's text.
|
| @com.google.android.exoplayer2.text.Cue.TextSizeType int | getTextSizeType() |
Gets the default text size type for this cue's text.
|
| @com.google.android.exoplayer2.text.Cue.VerticalType int | getVerticalType() |
Gets the vertical formatting for this Cue.
|
| int | getWindowColor() |
Gets the fill color of the window.
|
| boolean | isWindowColorSet() |
Returns true if the fill color of the window is set.
|
| Cue.Builder | setBitmap(Bitmap bitmap) |
Sets the cue image.
|
| Cue.Builder | setBitmapHeight(float bitmapHeight) |
Sets the bitmap height as a fraction of the viewport size.
|
| Cue.Builder | setLine(float line, @com.google.android.exoplayer2.text.Cue.LineType int lineType) |
Sets the position of the cue box within the viewport in the direction orthogonal to the writing direction.
|
| Cue.Builder | setLineAnchor(@com.google.android.exoplayer2.text.Cue.AnchorType int lineAnchor) |
Sets the cue box anchor positioned by line.
|
| Cue.Builder | setMultiRowAlignment(Layout.Alignment multiRowAlignment) |
Sets the multi-row alignment of the cue.
|
| Cue.Builder | setPosition(float position) |
Sets the fractional position of the positionAnchor of the cue box within the viewport in the direction orthogonal to line.
|
| Cue.Builder | setPositionAnchor(@com.google.android.exoplayer2.text.Cue.AnchorType int positionAnchor) |
Sets the cue box anchor positioned by position.
|
| Cue.Builder | setShearDegrees(float shearDegrees) |
Sets the shear angle for this Cue.
|
| Cue.Builder | setSize(float size) |
Sets the size of the cue box in the writing direction specified as a fraction of the viewport size in that direction.
|
| Cue.Builder | setText(CharSequence text) |
Sets the cue text.
|
| Cue.Builder | setTextAlignment(Layout.Alignment textAlignment) |
Sets the alignment of the cue text within the cue box.
|
| Cue.Builder | setTextSize(float textSize, @com.google.android.exoplayer2.text.Cue.TextSizeType int textSizeType) |
Sets the default text size and type for this cue's text.
|
| Cue.Builder | setVerticalType(@com.google.android.exoplayer2.text.Cue.VerticalType int verticalType) |
Sets the vertical formatting for this Cue.
|
| Cue.Builder | setWindowColor(int windowColor) |
Sets the fill color of the window.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public Builder()
-
@CanIgnoreReturnValue
public[Cue.Builder](Cue.Builder.html "class in com.google.android.exoplayer2.text")setText([CharSequence](https://developer.android.com/reference/java/lang/CharSequence.html "class or interface in java.lang")text)
Sets the cue text.
Note that text may be decorated with styling spans.
See Also:Cue.text
-
@Pure
@Nullable
public[CharSequence](https://developer.android.com/reference/java/lang/CharSequence.html "class or interface in java.lang")getText()
Gets the cue text.
See Also:Cue.text
-
@CanIgnoreReturnValue
public[Cue.Builder](Cue.Builder.html "class in com.google.android.exoplayer2.text")setBitmap([Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html "class or interface in android.graphics")bitmap)
Sets the cue image.
See Also:Cue.bitmap
-
@Pure
@Nullable
public[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html "class or interface in android.graphics")getBitmap()
Gets the cue image.
See Also:Cue.bitmap
-
@CanIgnoreReturnValue
public[Cue.Builder](Cue.Builder.html "class in com.google.android.exoplayer2.text")setTextAlignment(@Nullable[Layout.Alignment](https://developer.android.com/reference/android/text/Layout.Alignment.html "class or interface in android.text")textAlignment)
Sets the alignment of the cue text within the cue box.
Passing null means the alignment is undefined.
See Also:Cue.textAlignment
-
@Pure
@Nullable
public[Layout.Alignment](https://developer.android.com/reference/android/text/Layout.Alignment.html "class or interface in android.text")getTextAlignment()
Gets the alignment of the cue text within the cue box, or null if the alignment is undefined.
See Also:Cue.textAlignment
-
@CanIgnoreReturnValue
public[Cue.Builder](Cue.Builder.html "class in com.google.android.exoplayer2.text")setMultiRowAlignment(@Nullable[Layout.Alignment](https://developer.android.com/reference/android/text/Layout.Alignment.html "class or interface in android.text")multiRowAlignment)
Sets the multi-row alignment of the cue.
Passing null means the alignment is undefined.
See Also:Cue.multiRowAlignment
-
@CanIgnoreReturnValue
public[Cue.Builder](Cue.Builder.html "class in com.google.android.exoplayer2.text")setLine(float line,[@LineType](Cue.LineType.html "annotation in com.google.android.exoplayer2.text")@com.google.android.exoplayer2.text.Cue.LineType int lineType)
Sets the position of the cue box within the viewport in the direction orthogonal to the writing direction.
See Also:Cue.line, Cue.lineType
-
@Pure
public float getLine()
Gets the position of the lineAnchor of the cue box within the viewport in the direction orthogonal to the writing direction.
See Also:Cue.line
-
@Pure[@LineType](Cue.LineType.html "annotation in com.google.android.exoplayer2.text")public @com.google.android.exoplayer2.text.Cue.LineType int getLineType()
Gets the type of the value of getLine().
See Also:Cue.lineType
-
@CanIgnoreReturnValue
public[Cue.Builder](Cue.Builder.html "class in com.google.android.exoplayer2.text")setLineAnchor([@AnchorType](Cue.AnchorType.html "annotation in com.google.android.exoplayer2.text")@com.google.android.exoplayer2.text.Cue.AnchorType int lineAnchor)
Sets the cue box anchor positioned by line.
See Also:Cue.lineAnchor
-
@Pure[@AnchorType](Cue.AnchorType.html "annotation in com.google.android.exoplayer2.text")public @com.google.android.exoplayer2.text.Cue.AnchorType int getLineAnchor()
Gets the cue box anchor positioned by line.
See Also:Cue.lineAnchor
-
@CanIgnoreReturnValue
public[Cue.Builder](Cue.Builder.html "class in com.google.android.exoplayer2.text")setPosition(float position)
Sets the fractional position of the positionAnchor of the cue box within the viewport in the direction orthogonal to line.
See Also:Cue.position
-
@Pure
public float getPosition()
Gets the fractional position of the positionAnchor of the cue box within the viewport in the direction orthogonal to line.
See Also:Cue.position
-
@CanIgnoreReturnValue
public[Cue.Builder](Cue.Builder.html "class in com.google.android.exoplayer2.text")setPositionAnchor([@AnchorType](Cue.AnchorType.html "annotation in com.google.android.exoplayer2.text")@com.google.android.exoplayer2.text.Cue.AnchorType int positionAnchor)
Sets the cue box anchor positioned by position.
See Also:Cue.positionAnchor
-
@Pure[@AnchorType](Cue.AnchorType.html "annotation in com.google.android.exoplayer2.text")public @com.google.android.exoplayer2.text.Cue.AnchorType int getPositionAnchor()
Gets the cue box anchor positioned by position.
See Also:Cue.positionAnchor
-
@CanIgnoreReturnValue
public[Cue.Builder](Cue.Builder.html "class in com.google.android.exoplayer2.text")setTextSize(float textSize,[@TextSizeType](Cue.TextSizeType.html "annotation in com.google.android.exoplayer2.text")@com.google.android.exoplayer2.text.Cue.TextSizeType int textSizeType)
Sets the default text size and type for this cue's text.
See Also:Cue.textSize, Cue.textSizeType
-
@Pure[@TextSizeType](Cue.TextSizeType.html "annotation in com.google.android.exoplayer2.text")public @com.google.android.exoplayer2.text.Cue.TextSizeType int getTextSizeType()
Gets the default text size type for this cue's text.
See Also:Cue.textSizeType
-
@Pure
public float getTextSize()
Gets the default text size for this cue's text.
See Also:Cue.textSize
-
@CanIgnoreReturnValue
public[Cue.Builder](Cue.Builder.html "class in com.google.android.exoplayer2.text")setSize(float size)
Sets the size of the cue box in the writing direction specified as a fraction of the viewport size in that direction.
See Also:Cue.size
-
@Pure
public float getSize()
Gets the size of the cue box in the writing direction specified as a fraction of the viewport size in that direction.
See Also:Cue.size
-
@CanIgnoreReturnValue
public[Cue.Builder](Cue.Builder.html "class in com.google.android.exoplayer2.text")setBitmapHeight(float bitmapHeight)
Sets the bitmap height as a fraction of the viewport size.
See Also:Cue.bitmapHeight
-
@Pure
public float getBitmapHeight()
Gets the bitmap height as a fraction of the viewport size.
See Also:Cue.bitmapHeight
-
@CanIgnoreReturnValue
public[Cue.Builder](Cue.Builder.html "class in com.google.android.exoplayer2.text")setWindowColor(@ColorInt
int windowColor)
Sets the fill color of the window.
Also sets Cue.windowColorSet to true.
See Also:Cue.windowColor, Cue.windowColorSet
-
@CanIgnoreReturnValue
public[Cue.Builder](Cue.Builder.html "class in com.google.android.exoplayer2.text")clearWindowColor()
Sets Cue.windowColorSet to false.
-
public boolean isWindowColorSet()
Returns true if the fill color of the window is set.
See Also:Cue.windowColorSet
-
@Pure
@ColorInt
public int getWindowColor()
Gets the fill color of the window.
See Also:Cue.windowColor
-
@CanIgnoreReturnValue
public[Cue.Builder](Cue.Builder.html "class in com.google.android.exoplayer2.text")setVerticalType([@VerticalType](Cue.VerticalType.html "annotation in com.google.android.exoplayer2.text")@com.google.android.exoplayer2.text.Cue.VerticalType int verticalType)
Sets the vertical formatting for this Cue.
See Also:Cue.verticalType
-
@CanIgnoreReturnValue
public[Cue.Builder](Cue.Builder.html "class in com.google.android.exoplayer2.text")setShearDegrees(float shearDegrees)
Sets the shear angle for this Cue.
-
@Pure[@VerticalType](Cue.VerticalType.html "annotation in com.google.android.exoplayer2.text")public @com.google.android.exoplayer2.text.Cue.VerticalType int getVerticalType()
Gets the vertical formatting for this Cue.
See Also:Cue.verticalType
-
public[Cue](Cue.html "class in com.google.android.exoplayer2.text")build()
Build the cue.