Added in API level 21

Builder

open class Builder<C : TtsSpan.Builder<*>!>
kotlin.Any
   ↳ android.text.style.TtsSpan.Builder

A simple builder for TtsSpans. This builder can be used directly, but the more specific subclasses of this builder like TtsSpan.TextBuilder and TtsSpan.CardinalBuilder are likely more useful. This class uses generics so methods from this class can return instances of its child classes, resulting in a fluent API (CRTP pattern).

Summary

Public constructors
Builder(type: String!)

Public methods
open TtsSpan!

Returns a TtsSpan built from the parameters set by the setter methods.

open C
setIntArgument(arg: String!, value: Int)

Sets an argument to an int value.

open C
setLongArgument(arg: String!, value: Long)

Sets an argument to a long value.

open C
setStringArgument(arg: String!, value: String!)

Sets an argument to a string value.

Public constructors

Builder

Added in API level 21
Builder(type: String!)

Public methods

build

Added in API level 21
open fun build(): TtsSpan!

Returns a TtsSpan built from the parameters set by the setter methods.

Return
TtsSpan! A TtsSpan built with parameters of this builder.

setIntArgument

Added in API level 21
open fun setIntArgument(
    arg: String!,
    value: Int
): C

Sets an argument to an int value.

Parameters
arg String!: The argument name.
value Int: The value the argument should be set to.

setLongArgument

Added in API level 21
open fun setLongArgument(
    arg: String!,
    value: Long
): C

Sets an argument to a long value.

Parameters
arg String!: The argument name.
value Long: The value the argument should be set to.

setStringArgument

Added in API level 21
open fun setStringArgument(
    arg: String!,
    value: String!
): C

Sets an argument to a string value.

Parameters
arg String!: The argument name.
value String!: The value the argument should be set to.
Return
C This instance.