Stay organized with collections
Save and categorize content based on your preferences.
DecimalSeparatorDisplay
class DecimalSeparatorDisplay
An enum declaring how to render the decimal separator. Example outputs when formatting 1 and 1.1 in en-US:
- AUTO: "1" and "1.1"
- ALWAYS: "1." and "1.1"
Summary
Enum values |
Always show the decimal separator, even if there are no digits to display after the separator.
|
Show the decimal separator when there are one or more digits to display after the separator, and do not show it otherwise.
|
Enum values
AUTO
enum val AUTO : NumberFormatter.DecimalSeparatorDisplay
Show the decimal separator when there are one or more digits to display after the separator, and do not show it otherwise. This is the default behavior.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# NumberFormatter.DecimalSeparatorDisplay\n\nAdded in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nDecimalSeparatorDisplay\n=======================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/icu/number/NumberFormatter.DecimalSeparatorDisplay \"View this page in Java\") \n\n```\nclass DecimalSeparatorDisplay\n```\n\n|---|---|-----------------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) |||\n| ↳ | [kotlin.Enum](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html)\\\u003c[android.icu.number.NumberFormatter.DecimalSeparatorDisplay](#)\\\u003e ||\n| | ↳ | [android.icu.number.NumberFormatter.DecimalSeparatorDisplay](#) |\n\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known Direct Subclasses [NumberFormatter.DecimalSeparatorDisplay.ALWAYS](#ENUM_VALUE:ALWAYS), [NumberFormatter.DecimalSeparatorDisplay.AUTO](#ENUM_VALUE:AUTO) |----------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------| | [NumberFormatter.DecimalSeparatorDisplay.ALWAYS](#ENUM_VALUE:ALWAYS) | Always show the decimal separator, even if there are no digits to display after the separator. | | [NumberFormatter.DecimalSeparatorDisplay.AUTO](#ENUM_VALUE:AUTO) | Show the decimal separator when there are one or more digits to display after the separator, and do not show it otherwise. | |\n\nAn enum declaring how to render the decimal separator. Example outputs when formatting 1 and 1.1 in *en-US*:\n\n- AUTO: \"1\" and \"1.1\"\n- ALWAYS: \"1.\" and \"1.1\"\n\n\u003cbr /\u003e\n\nSummary\n-------\n\n| Enum values ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [ALWAYS](#ENUM_VALUE:ALWAYS) Always show the decimal separator, even if there are no digits to display after the separator. |\n| [AUTO](#ENUM_VALUE:AUTO) Show the decimal separator when there are one or more digits to display after the separator, and do not show it otherwise. |\n\nEnum values\n-----------\n\n### ALWAYS\n\nAdded in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nenum val ALWAYS : NumberFormatter.DecimalSeparatorDisplay\n```\n\nAlways show the decimal separator, even if there are no digits to display after the separator. \n**See Also**\n\n- [android.icu.number.NumberFormatter](/reference/kotlin/android/icu/number/NumberFormatter) \n\n### AUTO\n\nAdded in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nenum val AUTO : NumberFormatter.DecimalSeparatorDisplay\n```\n\nShow the decimal separator when there are one or more digits to display after the separator, and do not show it otherwise. This is the default behavior. \n**See Also**\n\n- [android.icu.number.NumberFormatter](/reference/kotlin/android/icu/number/NumberFormatter)"]]