RubySpan.Builder


class RubySpan.Builder


Builder class for creating RubySpan instances.

Summary

Public constructors

Public functions

RubySpan

Builds and returns a new RubySpan instance.

RubySpan.Builder
setOrientation(orientation: Int)

Sets the text orientation for the ruby text.

RubySpan.Builder
setTextScale(textScale: Float)

Sets the text scale for the ruby text.

Public constructors

Builder

Added in 1.0.0-alpha01
Builder(text: CharSequence)
Parameters
text: CharSequence

The ruby text to be displayed adjacent to the base text.

Public functions

build

Added in 1.0.0-alpha01
fun build(): RubySpan

Builds and returns a new RubySpan instance.

Returns
RubySpan

A new RubySpan instance.

setOrientation

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

Sets the text orientation for the ruby text.

By default, TextOrientation.MIXED is used.

Parameters
orientation: Int

The text orientation to set.

Returns
RubySpan.Builder

This Builder instance for method chaining.

setTextScale

Added in 1.0.0-alpha01
fun setTextScale(textScale: Float): RubySpan.Builder

Sets the text scale for the ruby text.

By default, 0.5f is used, meaning the ruby text will be half the size of the base text.

Parameters
textScale: Float

The text scale to set.

Returns
RubySpan.Builder

This Builder instance for method chaining.