VerticalTextLayout.Builder


public final class VerticalTextLayout.Builder


Builder class for creating instances of VerticalTextLayout.

Summary

Public constructors

Builder(
    @NonNull CharSequence text,
    int start,
    int end,
    @NonNull TextPaint paint,
    @Px float height
)

Public methods

final @NonNull VerticalTextLayout

Builds the VerticalTextLayout instance.

final @NonNull VerticalTextLayout.Builder
setOrientation(int orientation)

Sets the text orientation.

Public constructors

Builder

Added in 1.0.0-alpha01
public Builder(
    @NonNull CharSequence text,
    int start,
    int end,
    @NonNull TextPaint paint,
    @Px float height
)
Parameters
@NonNull CharSequence text

The text to be laid out.

int start

The inclusive start offset of the target text range.

int end

The exclusive end offset of the target text range.

@NonNull TextPaint paint

The TextPaint instance used for laying out the text.

@Px float height

The height constraint in pixels.

Public methods

build

Added in 1.0.0-alpha01
public final @NonNull VerticalTextLayout build()

Builds the VerticalTextLayout instance.

Returns
@NonNull VerticalTextLayout

The constructed VerticalTextLayout.

setOrientation

Added in 1.0.0-alpha01
public final @NonNull VerticalTextLayout.Builder setOrientation(int orientation)

Sets the text orientation.

Defaults to TextOrientation.MIXED.

Parameters
int orientation

The desired text orientation.

Returns
@NonNull VerticalTextLayout.Builder

This Builder instance for chaining.