VerticalTextLayout.Builder


class VerticalTextLayout.Builder


Builder class for creating instances of VerticalTextLayout.

Summary

Public constructors

Builder(
    text: CharSequence,
    start: Int,
    end: Int,
    paint: TextPaint,
    height: @Px Float
)

Public functions

VerticalTextLayout

Builds the VerticalTextLayout instance.

VerticalTextLayout.Builder
setOrientation(orientation: Int)

Sets the text orientation.

Public constructors

Builder

Added in 1.0.0-alpha01
Builder(
    text: CharSequence,
    start: Int,
    end: Int,
    paint: TextPaint,
    height: @Px Float
)
Parameters
text: CharSequence

The text to be laid out.

start: Int

The inclusive start offset of the target text range.

end: Int

The exclusive end offset of the target text range.

paint: TextPaint

The TextPaint instance used for laying out the text.

height: @Px Float

The height constraint in pixels.

Public functions

build

Added in 1.0.0-alpha01
fun build(): VerticalTextLayout

Builds the VerticalTextLayout instance.

Returns
VerticalTextLayout

The constructed VerticalTextLayout.

setOrientation

Added in 1.0.0-alpha01
fun setOrientation(orientation: Int): VerticalTextLayout.Builder

Sets the text orientation.

Defaults to TextOrientation.MIXED.

Parameters
orientation: Int

The desired text orientation.

Returns
VerticalTextLayout.Builder

This Builder instance for chaining.