# Cue.Builder

Artifact: [androidx.media3:media3-common](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/common/text/Cue.java+class:androidx.media3.common.text.Cue.Builder)

*** ** * ** ***


```
@UnstableApi
class Cue.Builder
```

<br />

*** ** * ** ***

A builder for `https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue` objects.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue.Builder#Builder()()` |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue!` | `https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue.Builder#build()()` Build the cue. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue.Builder#clearWindowColor()()` Sets `https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue#windowColorSet()` to false. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue.Builder#isWindowColorSet()()` Returns true if the fill color of the window is set. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue.Builder#setLine(float,int)(line: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, @https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue.LineType lineType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the position of the cue box within the viewport in the direction orthogonal to the writing direction. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue.Builder#setMultiRowAlignment(android.text.Layout.Alignment)(multiRowAlignment: https://developer.android.com/reference/android/text/Layout.Alignment.html?)` Sets the multi-row alignment of the cue. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue.Builder#setShearDegrees(float)(shearDegrees: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Sets the shear angle for this Cue. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue.Builder#setTextSize(float,int)(textSize: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, @https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue.TextSizeType textSizeType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the default text size and type for this cue's text. |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/android/graphics/Bitmap.html?` | `https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue.Builder#bitmap()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue.Builder#bitmapHeight()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue.Builder#line()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue.AnchorType https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue.Builder#lineAnchor()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue.LineType https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue.Builder#lineType()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue.Builder#position()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue.AnchorType https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue.Builder#positionAnchor()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue.Builder#size()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?` | `https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue.Builder#text()` |
| `https://developer.android.com/reference/android/text/Layout.Alignment.html?` | `https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue.Builder#textAlignment()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue.Builder#textSize()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue.TextSizeType https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue.Builder#textSizeType()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue.VerticalType https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue.Builder#verticalType()` |
| `@https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue.Builder#windowColor()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue.Builder#zIndex()` |

## Public constructors

### Builder

```
Builder()
```

## Public functions

### build

```
fun build(): Cue!
```

Build the cue.

### clearWindowColor

```
@CanIgnoreReturnValue
fun clearWindowColor(): Cue.Builder!
```

Sets `https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue#windowColorSet()` to false.

### isWindowColorSet

```
fun isWindowColorSet(): Boolean
```

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

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue#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 |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue#line()` |   |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue#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.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue#multiRowAlignment()` |   |

### 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.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue#textSize()` |   |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue#textSizeType()` |   |

## Public properties

### bitmap

```
var bitmap: Bitmap?
```

### bitmapHeight

```
var bitmapHeight: Float
```

### line

```
val line: Float
```

### lineAnchor

```
@Cue.AnchorType
var lineAnchor: Int
```

### lineType

```
@Cue.LineType
val lineType: Int
```

### position

```
var position: Float
```

### positionAnchor

```
@Cue.AnchorType
var positionAnchor: Int
```

### size

```
var size: Float
```

### text

```
var text: CharSequence?
```

### textAlignment

```
var textAlignment: Layout.Alignment?
```

### textSize

```
val textSize: Float
```

### textSizeType

```
@Cue.TextSizeType
val textSizeType: Int
```

### verticalType

```
@Cue.VerticalType
var verticalType: Int
```

### windowColor

```
var windowColor: @ColorInt Int
```

### zIndex

```
var zIndex: Int
```