语言

RestrictionEntry.SetChoiceValues 方法

定义

重载

名称 说明
SetChoiceValues(String[])

设置用户可以选择的字符串值列表。

SetChoiceValues(Context, Int32)

设置用户可以选择的字符串值列表,类似于 #setChoiceValues(String[])。

SetChoiceValues(String[])

设置用户可以选择的字符串值列表。

[Android.Runtime.Register("setChoiceValues", "([Ljava/lang/String;)V", "GetSetChoiceValues_arrayLjava_lang_String_Handler")]
public virtual void SetChoiceValues(string[]? choiceValues);
[<Android.Runtime.Register("setChoiceValues", "([Ljava/lang/String;)V", "GetSetChoiceValues_arrayLjava_lang_String_Handler")>]
abstract member SetChoiceValues : string[] -> unit
override this.SetChoiceValues : string[] -> unit

参数

choiceValues
String[]

字符串数组,该数组将是用户选择的选定值。

特性

注解

设置用户可以选择的字符串值列表。 如果未通过调用 #setChoiceEntries(String[])设置用户可见条目,则这些值将是向用户显示的条目。 将从此列表中选择值作为用户的选择,并且所选值可以通过调用 #getAllSelectedStrings()来检索,或者 #getSelectedString(),具体取决于它是多选类型还是选择类型。 此方法与其他 #TYPE_CHOICE类型无关,并且 #TYPE_MULTI_SELECT。

Java文档android.content.RestrictionEntry.setChoiceValues(java.lang.String[])。

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

另请参阅

适用于

SetChoiceValues(Context, Int32)

设置用户可以选择的字符串值列表,类似于 #setChoiceValues(String[])。

[Android.Runtime.Register("setChoiceValues", "(Landroid/content/Context;I)V", "GetSetChoiceValues_Landroid_content_Context_IHandler")]
public virtual void SetChoiceValues(Android.Content.Context? context, int stringArrayResId);
[<Android.Runtime.Register("setChoiceValues", "(Landroid/content/Context;I)V", "GetSetChoiceValues_Landroid_content_Context_IHandler")>]
abstract member SetChoiceValues : Android.Content.Context * int -> unit
override this.SetChoiceValues : Android.Content.Context * int -> unit

参数

context
Context

用于检索资源的应用程序上下文。

stringArrayResId
Int32

包含可能值的字符串数组的资源 ID。

特性

注解

设置用户可以选择的字符串值列表,类似于 #setChoiceValues(String[])。

Java文档android.content.RestrictionEntry.setChoiceValues(android.content.Context, int)。

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

另请参阅

适用于