Android APIs
public static class

TtsSpan.DecimalBuilder

extends SemioticClassBuilder<TtsSpan.DecimalBuilder>
java.lang.Object
   ↳ android.text.style.TtsSpan.Builder<android.text.style.TtsSpan.DecimalBuilder>
     ↳ android.text.style.TtsSpan.SemioticClassBuilder<android.text.style.TtsSpan.DecimalBuilder>
       ↳ android.text.style.TtsSpan.DecimalBuilder

Class Overview

A builder for TtsSpans of type TYPE_DECIMAL.

Summary

Public Constructors
TtsSpan.DecimalBuilder()
Creates a builder for a TtsSpan of type TYPE_DECIMAL.
TtsSpan.DecimalBuilder(double number, int minimumFractionDigits, int maximumFractionDigits)
Creates a TtsSpan of type TYPE_DECIMAL and sets the ARG_INTEGER_PART and ARG_FRACTIONAL_PART arguments.
TtsSpan.DecimalBuilder(String integerPart, String fractionalPart)
Creates a TtsSpan of type TYPE_DECIMAL and sets the ARG_INTEGER_PART and ARG_FRACTIONAL_PART arguments.
Public Methods
TtsSpan.DecimalBuilder setArgumentsFromDouble(double number, int minimumFractionDigits, int maximumFractionDigits)
Convenience method takes a double and a maximum number of fractional digits, it sets the ARG_INTEGER_PART and ARG_FRACTIONAL_PART arguments.
TtsSpan.DecimalBuilder setFractionalPart(String fractionalPart)
Sets the ARG_FRACTIONAL_PART argument.
TtsSpan.DecimalBuilder setIntegerPart(long integerPart)
Convenience method that converts the number to a String and sets it to the value for ARG_INTEGER_PART.
TtsSpan.DecimalBuilder setIntegerPart(String integerPart)
Sets the ARG_INTEGER_PART argument.
[Expand]
Inherited Methods
From class android.text.style.TtsSpan.SemioticClassBuilder
From class android.text.style.TtsSpan.Builder
From class java.lang.Object

Public Constructors

public TtsSpan.DecimalBuilder ()

Added in API level 21

Creates a builder for a TtsSpan of type TYPE_DECIMAL.

public TtsSpan.DecimalBuilder (double number, int minimumFractionDigits, int maximumFractionDigits)

Added in API level 21

public TtsSpan.DecimalBuilder (String integerPart, String fractionalPart)

Added in API level 21

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

Public Methods

public TtsSpan.DecimalBuilder setArgumentsFromDouble (double number, int minimumFractionDigits, int maximumFractionDigits)

Added in API level 21

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 The number to be synthesized.
minimumFractionDigits The minimum number of fraction digits that are pronounced.
maximumFractionDigits The maximum number of fraction digits that are pronounced. If maximumFractionDigits < minimumFractionDigits then minimumFractionDigits will be assumed to be equal to maximumFractionDigits.
Returns
  • This instance.

public TtsSpan.DecimalBuilder setFractionalPart (String fractionalPart)

Added in API level 21

Sets the ARG_FRACTIONAL_PART argument.

Parameters
fractionalPart A non-empty string of digits.
Returns
  • This instance.

public TtsSpan.DecimalBuilder setIntegerPart (long integerPart)

Added in API level 21

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

Parameters
integerPart The integer part of the decimal.
Returns
  • This instance.

public TtsSpan.DecimalBuilder setIntegerPart (String integerPart)

Added in API level 21

Sets the ARG_INTEGER_PART argument.

Parameters
integerPart A non-empty string of digits with an optional leading + or -.
Returns
  • This instance.