DecimalFormat.FormatWidth Property
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.
Returns the minimum number of characters in formatted output. -or- <strong>Padding:</strong> Sets the minimum width of the string output by the formatting pipeline.
public virtual int FormatWidth { [Android.Runtime.Register("getFormatWidth", "()I", "GetGetFormatWidthHandler", ApiSince=24)] get; [Android.Runtime.Register("setFormatWidth", "(I)V", "GetSetFormatWidth_IHandler", ApiSince=24)] set; }
[<get: Android.Runtime.Register("getFormatWidth", "()I", "GetGetFormatWidthHandler", ApiSince=24)>]
[<set: Android.Runtime.Register("setFormatWidth", "(I)V", "GetSetFormatWidth_IHandler", ApiSince=24)>]
member this.FormatWidth : int with get, set
Property Value
- Attributes
Remarks
Property getter documentation:
Returns the minimum number of characters in formatted output.
Java documentation for android.icu.text.DecimalFormat.getFormatWidth()
.
Property setter documentation:
<strong>Padding:</strong> Sets the minimum width of the string output by the formatting pipeline. For example, if padding is enabled and paddingWidth is set to 6, formatting the number "3.14159" with the pattern "0.00" will result in "··3.14" if '·' is your padding string.
If the number is longer than your padding width, the number will display as if no padding width had been specified, which may result in strings longer than the padding width.
Padding can be specified in the pattern string using the '*' symbol. For example, the format "*x######0" has a format width of 7 and a pad character of 'x'.
Padding is currently counted in UTF-16 code units; see ticket #13034 for more information.
Java documentation for android.icu.text.DecimalFormat.setFormatWidth(int)
.
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.