Skip to content

Most visited

Recently visited

navigation

TtsSpan.DecimalBuilder

public static class TtsSpan.DecimalBuilder
extends SemioticClassBuilder<TtsSpan.DecimalBuilder>

java.lang.Object
   ↳ android.text.style.TtsSpan.Builder<C extends android.text.style.TtsSpan.SemioticClassBuilder<?>>
     ↳ 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

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(String integerPart)

Sets the ARG_INTEGER_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.

Inherited methods

From class android.text.style.TtsSpan.SemioticClassBuilder
From class android.text.style.TtsSpan.Builder
From class java.lang.Object

Public constructors

TtsSpan.DecimalBuilder

added in API level 21
TtsSpan.DecimalBuilder ()

Creates a builder for a TtsSpan of type TYPE_DECIMAL.

TtsSpan.DecimalBuilder

added in API level 21
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.

Parameters
number double

minimumFractionDigits int

maximumFractionDigits int

See also:

TtsSpan.DecimalBuilder

added in API level 21
TtsSpan.DecimalBuilder (String integerPart, 
                String fractionalPart)

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

Parameters
integerPart String

fractionalPart String

Public methods

setArgumentsFromDouble

added in API level 21
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.

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.

Returns
TtsSpan.DecimalBuilder This instance.

setFractionalPart

added in API level 21
TtsSpan.DecimalBuilder setFractionalPart (String fractionalPart)

Sets the ARG_FRACTIONAL_PART argument.

Parameters
fractionalPart String: A non-empty string of digits.

Returns
TtsSpan.DecimalBuilder This instance.

setIntegerPart

added in API level 21
TtsSpan.DecimalBuilder setIntegerPart (String integerPart)

Sets the ARG_INTEGER_PART argument.

Parameters
integerPart String: A non-empty string of digits with an optional leading + or -.

Returns
TtsSpan.DecimalBuilder This instance.

setIntegerPart

added in API level 21
TtsSpan.DecimalBuilder setIntegerPart (long integerPart)

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.

Returns
TtsSpan.DecimalBuilder This instance.

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Follow Google Developers on WeChat

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience.
(Sep 2017 survey)