RangeIdentityFallback
class RangeIdentityFallback
kotlin.Any | ||
↳ | kotlin.Enum<android.icu.number.NumberRangeFormatter.RangeIdentityFallback> | |
↳ | android.icu.number.NumberRangeFormatter.RangeIdentityFallback |
Defines the behavior when the two numbers in the range are identical after rounding. To programmatically detect when the identity fallback is used, compare the lower and upper BigDecimals via FormattedNumber.
Summary
Enum values | |
---|---|
Show the number using a locale-sensitive approximation pattern. |
|
Show the number using a locale-sensitive approximation pattern. |
|
Show the number as the range of two equal values. |
|
Show the number as a single value rather than a range. |
Enum values
APPROXIMATELY
enum val APPROXIMATELY : NumberRangeFormatter.RangeIdentityFallback
Show the number using a locale-sensitive approximation pattern. Use the range pattern always, even if the inputs are the same. Example: "~$5"
APPROXIMATELY_OR_SINGLE_VALUE
enum val APPROXIMATELY_OR_SINGLE_VALUE : NumberRangeFormatter.RangeIdentityFallback
Show the number using a locale-sensitive approximation pattern. If the numbers were the same before rounding, show the single value. Example: "~$5" or "$5"
RANGE
enum val RANGE : NumberRangeFormatter.RangeIdentityFallback
Show the number as the range of two equal values. Use the range pattern always, even if the inputs are the same. Example (with RangeCollapse.NONE): "$5 – $5"
SINGLE_VALUE
enum val SINGLE_VALUE : NumberRangeFormatter.RangeIdentityFallback
Show the number as a single value rather than a range. Example: "$5"