NumberFormatterSettings.UnitWidth(NumberFormatter+UnitWidth) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the width of the unit (measure unit or currency).
[Android.Runtime.Register("unitWidth", "(Landroid/icu/number/NumberFormatter$UnitWidth;)Landroid/icu/number/NumberFormatterSettings;", "GetUnitWidth_Landroid_icu_number_NumberFormatter_UnitWidth_Handler", ApiSince=30)]
public virtual Java.Lang.Object? UnitWidth(Android.Icu.Number.NumberFormatter.UnitWidth? style);
[<Android.Runtime.Register("unitWidth", "(Landroid/icu/number/NumberFormatter$UnitWidth;)Landroid/icu/number/NumberFormatterSettings;", "GetUnitWidth_Landroid_icu_number_NumberFormatter_UnitWidth_Handler", ApiSince=30)>]
abstract member UnitWidth : Android.Icu.Number.NumberFormatter.UnitWidth -> Java.Lang.Object
override this.UnitWidth : Android.Icu.Number.NumberFormatter.UnitWidth -> Java.Lang.Object
Parameters
The width to use when rendering numbers.
Returns
The fluent chain
- Attributes
Remarks
Sets the width of the unit (measure unit or currency). Most common values:
Short: "$12.00", "12 m"
ISO Code: "USD 12.00"
Full name: "12.00 US dollars", "12 meters"
Pass an element from the UnitWidth enum to this setter.
NumberFormatter.with().unitWidth(UnitWidth.FULL_NAME)
The default is the SHORT width.
Android reference for android.icu.number.NumberFormatterSettings.unitWidth.
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.