LayoutElementBuilders.SpanText.Builder

public final class LayoutElementBuilders.SpanText.Builder implements LayoutElementBuilders.Span.Builder


Builder for SpanText.

Summary

Public methods

build

@Override
@NonNull
public @Override LayoutElementBuilders.SpanText build()

Builds an instance with values accumulated in this Builder.

setFontStyle

@NonNull
public LayoutElementBuilders.SpanText.Builder setFontStyle(@NonNull LayoutElementBuilders.FontStyle fontStyle)

Sets the style of font to use (size, bold etc). If not specified, defaults to the platform's default body font.

setFontStyle

@NonNull
public LayoutElementBuilders.SpanText.Builder setFontStyle(
    @NonNull LayoutElementBuilders.FontStyle.Builder fontStyleBuilder
)

Sets the style of font to use (size, bold etc). If not specified, defaults to the platform's default body font.

setText

@NonNull
public LayoutElementBuilders.SpanText.Builder setText(@NonNull TypeBuilders.StringProp text)

Sets the text to render.

setText

@NonNull
public LayoutElementBuilders.SpanText.Builder setText(@NonNull String text)

Sets the text to render.