Cue.Builder
@UnstableApi
public final class Cue.Builder
A builder for Cue objects.
Summary
Public fields |
|
|---|---|
@Nullable Bitmap |
|
float |
|
float |
|
int |
|
int |
|
float |
|
int |
|
float |
|
@Nullable CharSequence |
|
@Nullable Layout.Alignment |
|
float |
|
int |
|
int |
|
@ColorInt int |
|
int |
Public constructors |
|---|
Builder() |
Public methods |
|
|---|---|
Cue |
build()Build the cue. |
Cue.Builder |
Sets |
@Nullable Bitmap |
Gets the cue image. |
float |
Gets the bitmap height as a fraction of the viewport size. |
float |
Gets the position of the |
int |
Gets the cue box anchor positioned by |
int |
Gets the type of the value of |
float |
Gets the fractional position of the |
int |
Gets the cue box anchor positioned by |
float |
Gets the size of the cue box in the writing direction specified as a fraction of the viewport size in that direction. |
@Nullable CharSequence |
Gets the cue text. |
@Nullable Layout.Alignment |
Gets the alignment of the cue text within the cue box, or null if the alignment is undefined. |
float |
Gets the default text size for this cue's text. |
int |
Gets the default text size type for this cue's text. |
int |
Gets the vertical formatting for this Cue. |
@ColorInt int |
Gets the fill color of the window. |
int |
Gets the zIndex for this Cue. |
boolean |
Returns true if the fill color of the window is set. |
Cue.Builder |
@CanIgnoreReturnValueSets the cue image. |
Cue.Builder |
@CanIgnoreReturnValueSets the bitmap height as a fraction of the viewport size. |
Cue.Builder |
@CanIgnoreReturnValueSets the position of the cue box within the viewport in the direction orthogonal to the writing direction. |
Cue.Builder |
@CanIgnoreReturnValueSets the cue box anchor positioned by |
Cue.Builder |
@CanIgnoreReturnValueSets the multi-row alignment of the cue. |
Cue.Builder |
@CanIgnoreReturnValueSets the fractional position of the |
Cue.Builder |
@CanIgnoreReturnValueSets the cue box anchor positioned by |
Cue.Builder |
@CanIgnoreReturnValueSets the shear angle for this Cue. |
Cue.Builder |
@CanIgnoreReturnValueSets the size of the cue box in the writing direction specified as a fraction of the viewport size in that direction. |
Cue.Builder |
Sets the cue text. |
Cue.Builder |
@CanIgnoreReturnValueSets the alignment of the cue text within the cue box. |
Cue.Builder |
@CanIgnoreReturnValueSets the default text size and type for this cue's text. |
Cue.Builder |
@CanIgnoreReturnValueSets the vertical formatting for this Cue. |
Cue.Builder |
@CanIgnoreReturnValueSets the fill color of the window. |
Cue.Builder |
@CanIgnoreReturnValueSets the zIndex for this Cue. |
Public fields
Public constructors
Public methods
clearWindowColor
@CanIgnoreReturnValue
public Cue.Builder clearWindowColor()
Sets windowColorSet to false.
getBitmapHeight
@Pure
public float getBitmapHeight()
Gets the bitmap height as a fraction of the viewport size.
| See also | |
|---|---|
bitmapHeight |
getLine
@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 | |
|---|---|
line |
getLineAnchor
@Pure
@Cue.AnchorType
public int getLineAnchor()
Gets the cue box anchor positioned by line.
| See also | |
|---|---|
lineAnchor |
getLineType
@Pure
@Cue.LineType
public int getLineType()
Gets the type of the value of getLine.
| See also | |
|---|---|
lineType |
getPosition
@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 | |
|---|---|
position |
getPositionAnchor
@Pure
@Cue.AnchorType
public int getPositionAnchor()
Gets the cue box anchor positioned by position.
| See also | |
|---|---|
positionAnchor |
getSize
@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 | |
|---|---|
size |
getTextAlignment
@Pure
public @Nullable Layout.Alignment getTextAlignment()
Gets the alignment of the cue text within the cue box, or null if the alignment is undefined.
| See also | |
|---|---|
textAlignment |
getTextSize
@Pure
public float getTextSize()
Gets the default text size for this cue's text.
| See also | |
|---|---|
textSize |
getTextSizeType
@Pure
@Cue.TextSizeType
public int getTextSizeType()
Gets the default text size type for this cue's text.
| See also | |
|---|---|
textSizeType |
getVerticalType
@Pure
@Cue.VerticalType
public int getVerticalType()
Gets the vertical formatting for this Cue.
| See also | |
|---|---|
verticalType |
getWindowColor
@Pure
public @ColorInt int getWindowColor()
Gets the fill color of the window.
| See also | |
|---|---|
windowColor |
isWindowColorSet
public boolean isWindowColorSet()
Returns true if the fill color of the window is set.
| See also | |
|---|---|
windowColorSet |
setBitmap
@CanIgnoreReturnValue
public Cue.Builder setBitmap(Bitmap bitmap)
Sets the cue image.
Note that this will also set the text to null.
| See also | |
|---|---|
bitmap |
setBitmapHeight
@CanIgnoreReturnValue
public Cue.Builder setBitmapHeight(float bitmapHeight)
Sets the bitmap height as a fraction of the viewport size.
| See also | |
|---|---|
bitmapHeight |
setLine
@CanIgnoreReturnValue
public Cue.Builder setLine(float line, @Cue.LineType int lineType)
Sets the position of the cue box within the viewport in the direction orthogonal to the writing direction.
setLineAnchor
@CanIgnoreReturnValue
public Cue.Builder setLineAnchor(@Cue.AnchorType int lineAnchor)
Sets the cue box anchor positioned by line.
| See also | |
|---|---|
lineAnchor |
setMultiRowAlignment
@CanIgnoreReturnValue
public Cue.Builder setMultiRowAlignment(@Nullable Layout.Alignment multiRowAlignment)
Sets the multi-row alignment of the cue.
Passing null means the alignment is undefined.
| See also | |
|---|---|
multiRowAlignment |
setPosition
@CanIgnoreReturnValue
public 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.
| See also | |
|---|---|
position |
setPositionAnchor
@CanIgnoreReturnValue
public Cue.Builder setPositionAnchor(@Cue.AnchorType int positionAnchor)
Sets the cue box anchor positioned by position.
| See also | |
|---|---|
positionAnchor |
setShearDegrees
@CanIgnoreReturnValue
public Cue.Builder setShearDegrees(float shearDegrees)
Sets the shear angle for this Cue.
setSize
@CanIgnoreReturnValue
public 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.
| See also | |
|---|---|
size |
setText
@CanIgnoreReturnValue
public Cue.Builder setText(CharSequence text)
Sets the cue text.
Note that text may be decorated with styling spans.
Note that this will also set the bitmap to null.
| See also | |
|---|---|
text |
setTextAlignment
@CanIgnoreReturnValue
public Cue.Builder setTextAlignment(@Nullable Layout.Alignment textAlignment)
Sets the alignment of the cue text within the cue box.
Passing null means the alignment is undefined.
| See also | |
|---|---|
textAlignment |
setTextSize
@CanIgnoreReturnValue
public Cue.Builder setTextSize(float textSize, @Cue.TextSizeType int textSizeType)
Sets the default text size and type for this cue's text.
| See also | |
|---|---|
textSize |
|
textSizeType |
setVerticalType
@CanIgnoreReturnValue
public Cue.Builder setVerticalType(@Cue.VerticalType int verticalType)
Sets the vertical formatting for this Cue.
| See also | |
|---|---|
verticalType |
setWindowColor
@CanIgnoreReturnValue
public Cue.Builder setWindowColor(@ColorInt int windowColor)
Sets the fill color of the window.
Also sets windowColorSet to true.
| See also | |
|---|---|
windowColor |
|
windowColorSet |
setZIndex
@CanIgnoreReturnValue
public Cue.Builder setZIndex(int zIndex)
Sets the zIndex for this Cue.