Language

NumberRangeFormatterSettings.IdentityFallback Method

Definition

Sets the behavior when the two sides of the range are the same.

[Android.Runtime.Register("identityFallback", "(Landroid/icu/number/NumberRangeFormatter$RangeIdentityFallback;)Landroid/icu/number/NumberRangeFormatterSettings;", "GetIdentityFallback_Landroid_icu_number_NumberRangeFormatter_RangeIdentityFallback_Handler", ApiSince=30)]
public virtual Java.Lang.Object? IdentityFallback(Android.Icu.Number.NumberRangeFormatter.RangeIdentityFallback? identityFallback);
[<Android.Runtime.Register("identityFallback", "(Landroid/icu/number/NumberRangeFormatter$RangeIdentityFallback;)Landroid/icu/number/NumberRangeFormatterSettings;", "GetIdentityFallback_Landroid_icu_number_NumberRangeFormatter_RangeIdentityFallback_Handler", ApiSince=30)>]
abstract member IdentityFallback : Android.Icu.Number.NumberRangeFormatter.RangeIdentityFallback -> Java.Lang.Object
override this.IdentityFallback : Android.Icu.Number.NumberRangeFormatter.RangeIdentityFallback -> Java.Lang.Object

Parameters

identityFallback
NumberRangeFormatter.RangeIdentityFallback

The strategy to use when formatting two numbers that end up being the same.

Returns

The fluent chain.

Attributes

Remarks

Sets the behavior when the two sides of the range are the same. This could happen if the same two numbers are passed to the formatRange function, or if different numbers are passed to the function but they become the same after rounding rules are applied. Possible values:

SINGLE_VALUE: "5 miles"

APPROXIMATELY_OR_SINGLE_VALUE: "~5 miles" or "5 miles", depending on whether the number was the same before rounding was applied

APPROXIMATELY: "~5 miles"

RANGE: "5-5 miles" (with collapse=UNIT)

The default value is APPROXIMATELY.

Android reference for android.icu.number.NumberRangeFormatterSettings.identityFallback.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to