次の方法で共有


NumberFormatterSettings.IntegerWidth(IntegerWidth) Method

Definition

Specifies the minimum and maximum number of digits to render before the decimal mark.

[Android.Runtime.Register("integerWidth", "(Landroid/icu/number/IntegerWidth;)Landroid/icu/number/NumberFormatterSettings;", "GetIntegerWidth_Landroid_icu_number_IntegerWidth_Handler", ApiSince=30)]
public virtual Java.Lang.Object? IntegerWidth (Android.Icu.Number.IntegerWidth? style);
[<Android.Runtime.Register("integerWidth", "(Landroid/icu/number/IntegerWidth;)Landroid/icu/number/NumberFormatterSettings;", "GetIntegerWidth_Landroid_icu_number_IntegerWidth_Handler", ApiSince=30)>]
abstract member IntegerWidth : Android.Icu.Number.IntegerWidth -> Java.Lang.Object
override this.IntegerWidth : Android.Icu.Number.IntegerWidth -> Java.Lang.Object

Parameters

style
IntegerWidth

The integer width to use.

Returns

The fluent chain.

Attributes

Remarks

Specifies the minimum and maximum number of digits to render before the decimal mark.

<ul> <li>Zero minimum integer digits: ".08" <li>One minimum integer digit: "0.08" <li>Two minimum integer digits: "00.08" </ul>

Pass this method the return value of IntegerWidth#zeroFillTo(int). For example:

NumberFormatter.with().integerWidth(IntegerWidth.zeroFillTo(2))

The default is to have one minimum integer digit.

Java documentation for android.icu.number.NumberFormatterSettings.integerWidth(android.icu.number.IntegerWidth).

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