@UnstableApi
class Cue.Builder


A builder for Cue objects.

Summary

Public constructors

Public functions

Cue!

Build the cue.

Cue.Builder!

Sets windowColorSet to false.

Boolean

Returns true if the fill color of the window is set.

Cue.Builder!

Sets the position of the cue box within the viewport in the direction orthogonal to the writing direction.

Cue.Builder!

Sets the multi-row alignment of the cue.

Cue.Builder!

Sets the shear angle for this Cue.

Cue.Builder!

Sets the default text size and type for this cue's text.

Public properties

Bitmap?

Gets the cue image.

Float

Gets the bitmap height as a fraction of the viewport size.

Float

Gets the position of the lineAnchor of the cue box within the viewport in the direction orthogonal to the writing direction.

Int

Gets the cue box anchor positioned by line.

Int

Gets the type of the value of getLine.

Float

Gets the fractional position of the positionAnchor of the cue box within the viewport in the direction orthogonal to line.

Int

Gets the cue box anchor positioned by position.

Float

Gets the size of the cue box in the writing direction specified as a fraction of the viewport size in that direction.

CharSequence?

Gets the cue text.

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.

Public constructors

Builder

Builder()

Public functions

build

fun build(): Cue!

Build the cue.

clearWindowColor

@CanIgnoreReturnValue
fun clearWindowColor(): Cue.Builder!

Sets windowColorSet to false.

isWindowColorSet

fun isWindowColorSet(): Boolean

Returns true if the fill color of the window is set.

See also
windowColorSet

setLine

@CanIgnoreReturnValue
fun setLine(line: Float, @Cue.LineType lineType: Int): Cue.Builder!

Sets the position of the cue box within the viewport in the direction orthogonal to the writing direction.

See also
line
lineType

setMultiRowAlignment

@CanIgnoreReturnValue
fun setMultiRowAlignment(multiRowAlignment: Layout.Alignment?): Cue.Builder!

Sets the multi-row alignment of the cue.

Passing null means the alignment is undefined.

setShearDegrees

@CanIgnoreReturnValue
fun setShearDegrees(shearDegrees: Float): Cue.Builder!

Sets the shear angle for this Cue.

setTextSize

@CanIgnoreReturnValue
fun setTextSize(textSize: Float, @Cue.TextSizeType textSizeType: Int): Cue.Builder!

Sets the default text size and type for this cue's text.

Public properties

bitmap

var bitmap: Bitmap?

Gets the cue image.

See also
bitmap

bitmapHeight

var bitmapHeight: Float

Gets the bitmap height as a fraction of the viewport size.

See also
bitmapHeight

line

val line: Float

Gets the position of the lineAnchor of the cue box within the viewport in the direction orthogonal to the writing direction.

See also
line

lineAnchor

@Cue.AnchorType
var lineAnchor: Int

Gets the cue box anchor positioned by line.

See also
lineAnchor

lineType

@Cue.LineType
val lineType: Int

Gets the type of the value of getLine.

See also
lineType

position

var position: Float

Gets the fractional position of the positionAnchor of the cue box within the viewport in the direction orthogonal to line.

See also
position

positionAnchor

@Cue.AnchorType
var positionAnchor: Int

Gets the cue box anchor positioned by position.

See also
positionAnchor

size

var size: Float

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

text

var text: CharSequence?

Gets the cue text.

See also
text

textAlignment

var textAlignment: Layout.Alignment?

Gets the alignment of the cue text within the cue box, or null if the alignment is undefined.

See also
textAlignment

textSize

val textSize: Float

Gets the default text size for this cue's text.

See also
textSize

textSizeType

@Cue.TextSizeType
val textSizeType: Int

Gets the default text size type for this cue's text.

See also
textSizeType

verticalType

@Cue.VerticalType
var verticalType: Int

Gets the vertical formatting for this Cue.

See also
verticalType

windowColor

var windowColor: @ColorInt Int

Gets the fill color of the window.

See also
windowColor

zIndex

var zIndex: Int

Gets the zIndex for this Cue.