RestrictionEntry.SetChoiceValues 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| SetChoiceValues(String[]) |
設定一個可由使用者選擇的字串值清單。 |
| SetChoiceValues(Context, Int32) |
設定一個可由使用者選擇的字串值清單,類似於 |
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[])。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
另請參閱
適用於
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)。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。