Stay organized with collections
Save and categorize content based on your preferences.
TrailingZeroDisplay
class TrailingZeroDisplay
An enum declaring how to render trailing zeros.
- AUTO: 0.90, 1.00, 1.10
- HIDE_IF_WHOLE: 0.90, 1, 1.10
Summary
Enum values |
Display trailing zeros according to the settings for minimum fraction and significant digits.
|
Same as AUTO, but hide trailing zeros after the decimal separator if they are all zero.
|
Enum values
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.TrailingZeroDisplay\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nTrailingZeroDisplay\n===================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/icu/number/NumberFormatter.TrailingZeroDisplay \"View this page in Java\") \n\n```\nclass TrailingZeroDisplay\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.TrailingZeroDisplay](#)\\\u003e ||\n| | ↳ | [android.icu.number.NumberFormatter.TrailingZeroDisplay](#) |\n\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known Direct Subclasses [NumberFormatter.TrailingZeroDisplay.AUTO](#ENUM_VALUE:AUTO), [NumberFormatter.TrailingZeroDisplay.HIDE_IF_WHOLE](#ENUM_VALUE:HIDE_IF_WHOLE) |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------| | [NumberFormatter.TrailingZeroDisplay.AUTO](#ENUM_VALUE:AUTO) | Display trailing zeros according to the settings for minimum fraction and significant digits. | | [NumberFormatter.TrailingZeroDisplay.HIDE_IF_WHOLE](#ENUM_VALUE:HIDE_IF_WHOLE) | Same as AUTO, but hide trailing zeros after the decimal separator if they are all zero. | |\n\nAn enum declaring how to render trailing zeros.\n\n- AUTO: 0.90, 1.00, 1.10\n- HIDE_IF_WHOLE: 0.90, 1, 1.10\n\n\u003cbr /\u003e\n\nSummary\n-------\n\n| Enum values ||\n|------------------------------------------------------------------------------------------------------------------------------------|---|\n| [AUTO](#ENUM_VALUE:AUTO) Display trailing zeros according to the settings for minimum fraction and significant digits. |\n| [HIDE_IF_WHOLE](#ENUM_VALUE:HIDE_IF_WHOLE) Same as AUTO, but hide trailing zeros after the decimal separator if they are all zero. |\n\nEnum values\n-----------\n\n### AUTO\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nenum val AUTO : NumberFormatter.TrailingZeroDisplay\n```\n\nDisplay trailing zeros according to the settings for minimum fraction and significant digits. \n\n### HIDE_IF_WHOLE\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nenum val HIDE_IF_WHOLE : NumberFormatter.TrailingZeroDisplay\n```\n\nSame as AUTO, but hide trailing zeros after the decimal separator if they are all zero."]]