Aracılığıyla paylaş


AlertDialog.Builder.SetSingleChoiceItems Method

Definition

Overloads

SetSingleChoiceItems(ICursor, Int32, String, EventHandler<DialogClickEventArgs>)
SetSingleChoiceItems(ICursor, Int32, String, IDialogInterfaceOnClickListener)

Set a list of items to be displayed in the dialog as the content, you will be notified of the selected item via the supplied listener.

SetSingleChoiceItems(String[], Int32, EventHandler<DialogClickEventArgs>)
SetSingleChoiceItems(Int32, Int32, EventHandler<DialogClickEventArgs>)
SetSingleChoiceItems(String[], Int32, IDialogInterfaceOnClickListener)
SetSingleChoiceItems(ICharSequence[], Int32, EventHandler<DialogClickEventArgs>)
SetSingleChoiceItems(ICharSequence[], Int32, IDialogInterfaceOnClickListener)

Set a list of items to be displayed in the dialog as the content, you will be notified of the selected item via the supplied listener.

SetSingleChoiceItems(IListAdapter, Int32, EventHandler<DialogClickEventArgs>)
SetSingleChoiceItems(IListAdapter, Int32, IDialogInterfaceOnClickListener)

Set a list of items to be displayed in the dialog as the content, you will be notified of the selected item via the supplied listener.

SetSingleChoiceItems(Int32, Int32, IDialogInterfaceOnClickListener)

Set a list of items to be displayed in the dialog as the content, you will be notified of the selected item via the supplied listener.

SetSingleChoiceItems(ICursor, Int32, String, EventHandler<DialogClickEventArgs>)

public Android.App.AlertDialog.Builder? SetSingleChoiceItems (Android.Database.ICursor cursor, int checkedItem, string labelColumn, EventHandler<Android.Content.DialogClickEventArgs> handler);
member this.SetSingleChoiceItems : Android.Database.ICursor * int * string * EventHandler<Android.Content.DialogClickEventArgs> -> Android.App.AlertDialog.Builder

Parameters

cursor
ICursor
checkedItem
Int32
labelColumn
String

Returns

Remarks

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

SetSingleChoiceItems(ICursor, Int32, String, IDialogInterfaceOnClickListener)

Set a list of items to be displayed in the dialog as the content, you will be notified of the selected item via the supplied listener.

[Android.Runtime.Register("setSingleChoiceItems", "(Landroid/database/Cursor;ILjava/lang/String;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;", "GetSetSingleChoiceItems_Landroid_database_Cursor_ILjava_lang_String_Landroid_content_DialogInterface_OnClickListener_Handler")]
public virtual Android.App.AlertDialog.Builder SetSingleChoiceItems (Android.Database.ICursor cursor, int checkedItem, string labelColumn, Android.Content.IDialogInterfaceOnClickListener listener);
[<Android.Runtime.Register("setSingleChoiceItems", "(Landroid/database/Cursor;ILjava/lang/String;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;", "GetSetSingleChoiceItems_Landroid_database_Cursor_ILjava_lang_String_Landroid_content_DialogInterface_OnClickListener_Handler")>]
abstract member SetSingleChoiceItems : Android.Database.ICursor * int * string * Android.Content.IDialogInterfaceOnClickListener -> Android.App.AlertDialog.Builder
override this.SetSingleChoiceItems : Android.Database.ICursor * int * string * Android.Content.IDialogInterfaceOnClickListener -> Android.App.AlertDialog.Builder

Parameters

cursor
ICursor

the cursor to retrieve the items from.

checkedItem
Int32

specifies which item is checked. If -1 no items are checked.

labelColumn
String

The column name on the cursor containing the string to display in the label.

listener
IDialogInterfaceOnClickListener

notified when an item on the list is clicked. The dialog will not be dismissed when an item is clicked. It will only be dismissed if clicked on a button, if no buttons are supplied it's up to the user to dismiss the dialog.

Returns

Attributes

Remarks

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

SetSingleChoiceItems(String[], Int32, EventHandler<DialogClickEventArgs>)

public Android.App.AlertDialog.Builder? SetSingleChoiceItems (string[] items, int checkedItem, EventHandler<Android.Content.DialogClickEventArgs> handler);
member this.SetSingleChoiceItems : string[] * int * EventHandler<Android.Content.DialogClickEventArgs> -> Android.App.AlertDialog.Builder

Parameters

items
String[]
checkedItem
Int32

Returns

Remarks

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

SetSingleChoiceItems(Int32, Int32, EventHandler<DialogClickEventArgs>)

public Android.App.AlertDialog.Builder? SetSingleChoiceItems (int itemsId, int checkedItem, EventHandler<Android.Content.DialogClickEventArgs> handler);
member this.SetSingleChoiceItems : int * int * EventHandler<Android.Content.DialogClickEventArgs> -> Android.App.AlertDialog.Builder

Parameters

itemsId
Int32
checkedItem
Int32

Returns

Remarks

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

SetSingleChoiceItems(String[], Int32, IDialogInterfaceOnClickListener)

public Android.App.AlertDialog.Builder SetSingleChoiceItems (string[]? items, int checkedItem, Android.Content.IDialogInterfaceOnClickListener listener);
member this.SetSingleChoiceItems : string[] * int * Android.Content.IDialogInterfaceOnClickListener -> Android.App.AlertDialog.Builder

Parameters

items
String[]
checkedItem
Int32

Returns

Remarks

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

SetSingleChoiceItems(ICharSequence[], Int32, EventHandler<DialogClickEventArgs>)

public Android.App.AlertDialog.Builder? SetSingleChoiceItems (Java.Lang.ICharSequence[] items, int checkedItem, EventHandler<Android.Content.DialogClickEventArgs> handler);
member this.SetSingleChoiceItems : Java.Lang.ICharSequence[] * int * EventHandler<Android.Content.DialogClickEventArgs> -> Android.App.AlertDialog.Builder

Parameters

items
ICharSequence[]
checkedItem
Int32

Returns

Remarks

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

SetSingleChoiceItems(ICharSequence[], Int32, IDialogInterfaceOnClickListener)

Set a list of items to be displayed in the dialog as the content, you will be notified of the selected item via the supplied listener.

[Android.Runtime.Register("setSingleChoiceItems", "([Ljava/lang/CharSequence;ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;", "GetSetSingleChoiceItems_arrayLjava_lang_CharSequence_ILandroid_content_DialogInterface_OnClickListener_Handler")]
public virtual Android.App.AlertDialog.Builder SetSingleChoiceItems (Java.Lang.ICharSequence[]? items, int checkedItem, Android.Content.IDialogInterfaceOnClickListener listener);
[<Android.Runtime.Register("setSingleChoiceItems", "([Ljava/lang/CharSequence;ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;", "GetSetSingleChoiceItems_arrayLjava_lang_CharSequence_ILandroid_content_DialogInterface_OnClickListener_Handler")>]
abstract member SetSingleChoiceItems : Java.Lang.ICharSequence[] * int * Android.Content.IDialogInterfaceOnClickListener -> Android.App.AlertDialog.Builder
override this.SetSingleChoiceItems : Java.Lang.ICharSequence[] * int * Android.Content.IDialogInterfaceOnClickListener -> Android.App.AlertDialog.Builder

Parameters

items
ICharSequence[]

the items to be displayed.

checkedItem
Int32

specifies which item is checked. If -1 no items are checked.

listener
IDialogInterfaceOnClickListener

notified when an item on the list is clicked. The dialog will not be dismissed when an item is clicked. It will only be dismissed if clicked on a button, if no buttons are supplied it's up to the user to dismiss the dialog.

Returns

Attributes

Remarks

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

SetSingleChoiceItems(IListAdapter, Int32, EventHandler<DialogClickEventArgs>)

public Android.App.AlertDialog.Builder? SetSingleChoiceItems (Android.Widget.IListAdapter adapter, int checkedItem, EventHandler<Android.Content.DialogClickEventArgs> handler);
member this.SetSingleChoiceItems : Android.Widget.IListAdapter * int * EventHandler<Android.Content.DialogClickEventArgs> -> Android.App.AlertDialog.Builder

Parameters

adapter
IListAdapter
checkedItem
Int32

Returns

Remarks

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

SetSingleChoiceItems(IListAdapter, Int32, IDialogInterfaceOnClickListener)

Set a list of items to be displayed in the dialog as the content, you will be notified of the selected item via the supplied listener.

[Android.Runtime.Register("setSingleChoiceItems", "(Landroid/widget/ListAdapter;ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;", "GetSetSingleChoiceItems_Landroid_widget_ListAdapter_ILandroid_content_DialogInterface_OnClickListener_Handler")]
public virtual Android.App.AlertDialog.Builder SetSingleChoiceItems (Android.Widget.IListAdapter adapter, int checkedItem, Android.Content.IDialogInterfaceOnClickListener listener);
[<Android.Runtime.Register("setSingleChoiceItems", "(Landroid/widget/ListAdapter;ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;", "GetSetSingleChoiceItems_Landroid_widget_ListAdapter_ILandroid_content_DialogInterface_OnClickListener_Handler")>]
abstract member SetSingleChoiceItems : Android.Widget.IListAdapter * int * Android.Content.IDialogInterfaceOnClickListener -> Android.App.AlertDialog.Builder
override this.SetSingleChoiceItems : Android.Widget.IListAdapter * int * Android.Content.IDialogInterfaceOnClickListener -> Android.App.AlertDialog.Builder

Parameters

adapter
IListAdapter

The IListAdapter to supply the list of items

checkedItem
Int32

specifies which item is checked. If -1 no items are checked.

listener
IDialogInterfaceOnClickListener

notified when an item on the list is clicked. The dialog will not be dismissed when an item is clicked. It will only be dismissed if clicked on a button, if no buttons are supplied it's up to the user to dismiss the dialog.

Returns

Attributes

Remarks

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

SetSingleChoiceItems(Int32, Int32, IDialogInterfaceOnClickListener)

Set a list of items to be displayed in the dialog as the content, you will be notified of the selected item via the supplied listener.

[Android.Runtime.Register("setSingleChoiceItems", "(IILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;", "GetSetSingleChoiceItems_IILandroid_content_DialogInterface_OnClickListener_Handler")]
public virtual Android.App.AlertDialog.Builder SetSingleChoiceItems (int itemsId, int checkedItem, Android.Content.IDialogInterfaceOnClickListener listener);
[<Android.Runtime.Register("setSingleChoiceItems", "(IILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;", "GetSetSingleChoiceItems_IILandroid_content_DialogInterface_OnClickListener_Handler")>]
abstract member SetSingleChoiceItems : int * int * Android.Content.IDialogInterfaceOnClickListener -> Android.App.AlertDialog.Builder
override this.SetSingleChoiceItems : int * int * Android.Content.IDialogInterfaceOnClickListener -> Android.App.AlertDialog.Builder

Parameters

itemsId
Int32

the resource id of an array i.e. R.array.foo

checkedItem
Int32

specifies which item is checked. If -1 no items are checked.

listener
IDialogInterfaceOnClickListener

notified when an item on the list is clicked. The dialog will not be dismissed when an item is clicked. It will only be dismissed if clicked on a button, if no buttons are supplied it's up to the user to dismiss the dialog.

Returns

Attributes

Remarks

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