Share via


ChoiceFormat.SetChoices(Double[], String[]) Method

Definition

Set the choices to be used in formatting.

[Android.Runtime.Register("setChoices", "([D[Ljava/lang/String;)V", "GetSetChoices_arrayDarrayLjava_lang_String_Handler")]
public virtual void SetChoices (double[]? limits, string[]? formats);
[<Android.Runtime.Register("setChoices", "([D[Ljava/lang/String;)V", "GetSetChoices_arrayDarrayLjava_lang_String_Handler")>]
abstract member SetChoices : double[] * string[] -> unit
override this.SetChoices : double[] * string[] -> unit

Parameters

limits
Double[]

contains the top value that you want parsed with that format, and should be in ascending sorted order. When formatting X, the choice will be the i, where limit[i] &le; X < limit[i+1]. If the limit array is not in ascending order, the results of formatting will be incorrect.

formats
String[]

are the formats you want to use for each limit. They can be either Format objects or Strings. When formatting with object Y, if the object is a NumberFormat, then ((NumberFormat) Y).format(X) is called. Otherwise Y.toString() is called.

Attributes

Remarks

Set the choices to be used in formatting.

Java documentation for java.text.ChoiceFormat.setChoices(double[], java.lang.String[]).

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