SpannableStringBuilderKt

public final class SpannableStringBuilderKt


Summary

Public methods

static final @NonNull SpannableStringBuilder
SpannableStringBuilderKt.backgroundColor(
    SpannableStringBuilder receiver,
    @ColorInt int color,
    @ExtensionFunctionType Function1<SpannableStringBuilderUnit> builderAction
)

Wrap appended text in builderAction in a BackgroundColorSpan.

static final @NonNull SpannableStringBuilder

Wrap appended text in builderAction in a bold StyleSpan.

static final @NonNull SpannedString

Builds new string by populating a newly created SpannableStringBuilder using the provided builderAction and then converting it to SpannedString.

static final @NonNull SpannableStringBuilder
SpannableStringBuilderKt.color(
    SpannableStringBuilder receiver,
    @ColorInt int color,
    @ExtensionFunctionType Function1<SpannableStringBuilderUnit> builderAction
)

Wrap appended text in builderAction in a ForegroundColorSpan.

static final @NonNull SpannableStringBuilder
SpannableStringBuilderKt.inSpans(
    SpannableStringBuilder receiver,
    Object spans,
    @ExtensionFunctionType Function1<SpannableStringBuilderUnit> builderAction
)

Wrap appended text in builderAction in spans.

static final @NonNull SpannableStringBuilder
SpannableStringBuilderKt.inSpans(
    SpannableStringBuilder receiver,
    Object span,
    @ExtensionFunctionType Function1<SpannableStringBuilderUnit> builderAction
)

Wrap appended text in builderAction in span.

static final @NonNull SpannableStringBuilder

Wrap appended text in builderAction in an italic StyleSpan.

static final @NonNull SpannableStringBuilder
SpannableStringBuilderKt.scale(
    SpannableStringBuilder receiver,
    float proportion,
    @ExtensionFunctionType Function1<SpannableStringBuilderUnit> builderAction
)

Wrap appended text in builderAction in a RelativeSizeSpan.

static final @NonNull SpannableStringBuilder

Wrap appended text in builderAction in a StrikethroughSpan.

static final @NonNull SpannableStringBuilder

Wrap appended text in builderAction in a SubscriptSpan.

static final @NonNull SpannableStringBuilder

Wrap appended text in builderAction in a SuperscriptSpan.

static final @NonNull SpannableStringBuilder

Wrap appended text in builderAction in an UnderlineSpan.

Public methods

SpannableStringBuilderKt.backgroundColor

public static final @NonNull SpannableStringBuilder SpannableStringBuilderKt.backgroundColor(
    SpannableStringBuilder receiver,
    @ColorInt int color,
    @ExtensionFunctionType Function1<SpannableS