Added in API level 30

DecimalSeparatorDisplay


class DecimalSeparatorDisplay
kotlin.Any
   ↳ kotlin.Enum<android.icu.number.NumberFormatter.DecimalSeparatorDisplay>
   ↳ android.icu.number.NumberFormatter.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

ALWAYS

Added in API level 30
enum val ALWAYS : NumberFormatter.DecimalSeparatorDisplay

Always show the decimal separator, even if there are no digits to display after the separator.

AUTO

Added in API level 30
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.