语言

RestrictionEntry.SetChoiceEntries 方法

定义

重载

名称 说明
SetChoiceEntries(String[])

设置一个字符串列表,该字符串将作为选项呈现给用户。

SetChoiceEntries(Context, Int32)

设置一个字符串列表,该字符串将作为选项呈现给用户。

SetChoiceEntries(String[])

设置一个字符串列表,该字符串将作为选项呈现给用户。

[Android.Runtime.Register("setChoiceEntries", "([Ljava/lang/String;)V", "GetSetChoiceEntries_arrayLjava_lang_String_Handler")]
public virtual void SetChoiceEntries(string[]? choiceEntries);
[<Android.Runtime.Register("setChoiceEntries", "([Ljava/lang/String;)V", "GetSetChoiceEntries_arrayLjava_lang_String_Handler")>]
abstract member SetChoiceEntries : string[] -> unit
override this.SetChoiceEntries : string[] -> unit

参数

choiceEntries
String[]

用户可见选项的列表。

特性

注解

设置一个字符串列表,该字符串将作为选项呈现给用户。 当用户选择一个或多个这些选项时,可能值中的相应值将存储为所选字符串。 此数组的大小必须与数组集的大小 #setChoiceValues(String[])匹配。 此方法与其他 #TYPE_CHOICE类型无关,并且 #TYPE_MULTI_SELECT。

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

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

另请参阅

适用于

SetChoiceEntries(Context, Int32)

设置一个字符串列表,该字符串将作为选项呈现给用户。

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

参数

context
Context

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

stringArrayResId
Int32

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

特性

注解

设置一个字符串列表,该字符串将作为选项呈现给用户。 这类似于 #setChoiceEntries(String[])。

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

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

适用于