Keys for Number Patterns

This section lists the resource keys for formatting values in number controls.

The number control shows resource keys that begin with "format_". You can override their values, and also add new keys that begin with "format_".

Note: For these resource keys, the number grouping separator is always represented as the comma meta-character, and the decimal separator is always represented as the period meta-character. The actual grouping and separator characters are translated separately, exactly once. It is not necessary to translate these grouping and separator meta-characters at every place where they appear.

For more information on how to specify a number format, see Numeric Controls.

Number Patterns
Resource Key Reference Value Description
format_currency
\u00A4#,##0.00;
(\u00A4#,##0.00)
Specifies a basic currency format. The unicode character \u00A4 represents a currency symbol, which is substituted at runtime.

For example: $123,344.89 for positive numbers, ($34,121.00) for negative numbers

format_integer #,##0 Basic grouped integer format.

For example: 123,456

format_integer_ungrouped 0 Basic ungrouped integer format.

For example: 123456

format_decimal #,##0.### Basic decimal format.

For example: 123,456.123

format_decimal_1 #,##0.0 Decimal format showing exactly one decimal place.

For example: 123.1

format_decimal_2 #,##0.00 Decimal format showing exactly 2 decimal places.

For example: 123.10

format_decimal_3 #,##0.000 Decimal format showing exactly 3 decimal places.

For example: 123.100

format_decimal_4 #,##0.0000 Decimal format showing exactly 4 decimal places.

For example: 123.1000

format_decimal_ungrouped 0.### Basic ungrouped decimal format.

For example: 123456.123