Added in API level 21

DecimalBuilder


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

A builder for TtsSpans of type TYPE_DECIMAL.

Summary

Public constructors

Creates a builder for a TtsSpan of type TYPE_DECIMAL.

DecimalBuilder(number: Double, minimumFractionDigits: Int, maximumFractionDigits: Int)

Creates a TtsSpan of type TYPE_DECIMAL and sets the ARG_INTEGER_PART and ARG_FRACTIONAL_PART arguments.

DecimalBuilder(integerPart: String!, fractionalPart: String!)

Creates a TtsSpan of type TYPE_DECIMAL and sets the ARG_INTEGER_PART and ARG_FRACTIONAL_PART arguments.

Public methods
open TtsSpan.DecimalBuilder!
setArgumentsFromDouble(number: Double, minimumFractionDigits: Int, maximumFractionDigits: Int)

Convenience method takes a double and a maximum number of fractional digits, it sets the ARG_INTEGER_PART and ARG_FRACTIONAL_PART arguments.

open TtsSpan.DecimalBuilder!
setFractionalPart(fractionalPart: String!)

Sets the ARG_FRACTIONAL_PART argument.

open TtsSpan.DecimalBuilder!
setIntegerPart(integerPart: String!)

Sets the ARG_INTEGER_PART argument.

open TtsSpan.DecimalBuilder!
setIntegerPart(integerPart: Long)

Convenience method that converts the number to a String and sets it to the value for ARG_INTEGER_PART.

Inherited functions

Public constructors

DecimalBuilder

Added in API level 21
DecimalBuilder()

Creates a builder for a TtsSpan of type TYPE_DECIMAL.

DecimalBuilder

Added in API level 21
DecimalBuilder(
    number: Double,
    minimumFractionDigits: Int,
    maximumFractionDigits: Int)

Creates a TtsSpan of type TYPE_DECIMAL and sets the ARG_INTEGER_PART and ARG_FRACTIONAL_PART arguments.

DecimalBuilder

Added in API level 21
DecimalBuilder(
    integerPart: String!,
    fractionalPart: String!)

Creates a TtsSpan of type TYPE_DECIMAL and sets the ARG_INTEGER_PART and ARG_FRACTIONAL_PART arguments.

Public methods

setArgumentsFromDouble

Added in API level 21
open fun setArgumentsFromDouble(
    number: Double,
    minimumFractionDigits: Int,
    maximumFractionDigits: Int
): TtsSpan.DecimalBuilder!

Convenience method takes a double and a maximum number of fractional digits, it sets the ARG_INTEGER_PART and ARG_FRACTIONAL_PART arguments.

Parameters
number Double: The number to be synthesized.
minimumFractionDigits Int: The minimum number of fraction digits that are pronounced.
maximumFractionDigits Int: The maximum number of fraction digits that are pronounced. If maximumFractionDigits < minimumFractionDigits then minimumFractionDigits will be assumed to be equal to maximumFractionDigits.
Return
TtsSpan.DecimalBuilder! This instance.

setFractionalPart

Added in API level 21
open fun setFractionalPart(fractionalPart: String!): TtsSpan.DecimalBuilder!

Sets the ARG_FRACTIONAL_PART argument.

Parameters
fractionalPart String!: A non-empty string of digits.
Return
TtsSpan.DecimalBuilder! This instance.

setIntegerPart

Added in API level 21
open fun setIntegerPart(integerPart: String!): TtsSpan.DecimalBuilder!

Sets the ARG_INTEGER_PART argument.

Parameters
integerPart String!: A non-empty string of digits with an optional leading + or -.
Return
TtsSpan.DecimalBuilder! This instance.

setIntegerPart

Added in API level 21
open fun setIntegerPart(integerPart: Long): TtsSpan.DecimalBuilder!

Convenience method that converts the number to a String and sets it to the value for ARG_INTEGER_PART.

Parameters
integerPart Long: The integer part of the decimal.
Return
TtsSpan.DecimalBuilder! This instance.