Lenguaje

NumberFormatterSettings.UnitWidth(NumberFormatter+UnitWidth) Método

Definición

Establece el ancho de la unidad (unidad de medida o moneda).

[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

Parámetros

style
NumberFormatter.UnitWidth

Ancho que se va a usar al representar números.

Devoluciones

La cadena fluida

Atributos

Comentarios

Establece el ancho de la unidad (unidad de medida o moneda). Valores más comunes:

Short: "$12.00", "12 m"

Código ISO: "12,00 USD"

Nombre completo: "12,00 DÓLARES ESTADOUNIDENSEs", "12 metros"

Pase un elemento de la enumeración UnitWidth a este establecedor.

NumberFormatter.with().unitWidth(UnitWidth.FULL_NAME)

El valor predeterminado es el ancho SHORT.

Referencia de Android para android.icu.number.NumberFormatterSettings.unitWidth.

Las partes de esta página son modificaciones basadas en el trabajo creado y compartido por el Android y se usan según los términos descritos en creative Creative Commons 2.5 Attribution License.

Se aplica a