public final class RubySpan


A span used to specify ruby text for a portion of the text.

Ruby text cannot be nested (i.e., ruby text cannot contain further ruby text). Ruby spans also cannot overlap each other.

This span is designed for use with VerticalTextLayout.

Summary

Nested types

public final class RubySpan.Builder

Builder class for creating RubySpan instances.

Public methods

final int

The text orientation of the ruby text.

final @NonNull CharSequence

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

final float

The text scale ratio of the ruby text relative to the base text.

Public methods

getOrientation

Added in 1.0.0-alpha01
public final int getOrientation()

The text orientation of the ruby text. Defaults to TextOrientation.MIXED.

getText

Added in 1.0.0-alpha01
public final @NonNull CharSequence getText()

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

getTextScale

Added in 1.0.0-alpha01
public final float getTextScale()

The text scale ratio of the ruby text relative to the base text. Defaults to 0.5f.