AlertDialog.Builder.SetSingleChoiceItems Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
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
- handler
- EventHandler<DialogClickEventArgs>
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
Cursor: the cursor to retrieve the items from.
- checkedItem
- Int32
int: specifies which item is checked. If -1 no items are checked.
- labelColumn
- String
String: The column name on the cursor containing the string to display in the label.
- listener
- IDialogInterfaceOnClickListener
DialogInterface.OnClickListener: 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
This Builder object to allow for chaining of calls to set methods
- Attributes
Remarks
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. The list will have a check mark displayed to the right of the text for the checked item. Clicking on an item in the list will not dismiss the dialog. Clicking on a button will dismiss the dialog.
Android reference for android.app.AlertDialog.Builder.setSingleChoiceItems.
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
- handler
- EventHandler<DialogClickEventArgs>
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
- handler
- EventHandler<DialogClickEventArgs>
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)
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.
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[]
CharSequence: the items to be displayed.
- checkedItem
- Int32
int: specifies which item is checked. If -1 no items are checked.
- listener
- IDialogInterfaceOnClickListener
DialogInterface.OnClickListener: 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
This Builder object to allow for chaining of calls to set methods
Remarks
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. The list will have a check mark displayed to the right of the text for the checked item. Clicking on an item in the list will not dismiss the dialog. Clicking on a button will dismiss the dialog.
Android reference for android.app.AlertDialog.Builder.setSingleChoiceItems.
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
- handler
- EventHandler<DialogClickEventArgs>
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[]
CharSequence: the items to be displayed.
- checkedItem
- Int32
int: specifies which item is checked. If -1 no items are checked.
- listener
- IDialogInterfaceOnClickListener
DialogInterface.OnClickListener: 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
This Builder object to allow for chaining of calls to set methods
- Attributes
Remarks
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. The list will have a check mark displayed to the right of the text for the checked item. Clicking on an item in the list will not dismiss the dialog. Clicking on a button will dismiss the dialog.
Android reference for android.app.AlertDialog.Builder.setSingleChoiceItems.
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
- handler
- EventHandler<DialogClickEventArgs>
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
ListAdapter: The ListAdapter to supply the list of items
- checkedItem
- Int32
int: specifies which item is checked. If -1 no items are checked.
- listener
- IDialogInterfaceOnClickListener
DialogInterface.OnClickListener: 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
This Builder object to allow for chaining of calls to set methods
- Attributes
Remarks
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. The list will have a check mark displayed to the right of the text for the checked item. Clicking on an item in the list will not dismiss the dialog. Clicking on a button will dismiss the dialog.
Android reference for android.app.AlertDialog.Builder.setSingleChoiceItems.
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
int: the resource id of an array i.e. R.array.foo
- checkedItem
- Int32
int: specifies which item is checked. If -1 no items are checked.
- listener
- IDialogInterfaceOnClickListener
DialogInterface.OnClickListener: 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
This Builder object to allow for chaining of calls to set methods
- Attributes
Remarks
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. This should be an array type i.e. R.array.foo The list will have a check mark displayed to the right of the text for the checked item. Clicking on an item in the list will not dismiss the dialog. Clicking on a button will dismiss the dialog.
Android reference for android.app.AlertDialog.Builder.setSingleChoiceItems.
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.