Language

AlertDialog.Builder.SetItems Method

Definition

Overloads

Name Description
SetItems(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.

SetItems(String[], EventHandler<DialogClickEventArgs>)

Configures string entries for a dialog list with a managed click handler.

SetItems(Int32, EventHandler<DialogClickEventArgs>)

Configures a resource-backed dialog list with a managed click handler.

SetItems(ICharSequence[], 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.

SetItems(ICharSequence[], EventHandler<DialogClickEventArgs>)

Configures text entries for a dialog list with a managed click handler.

SetItems(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.

SetItems(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.

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

Parameters

items
String[]

CharSequence

listener
IDialogInterfaceOnClickListener

DialogInterface.OnClickListener

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.

Android reference for android.app.AlertDialog.Builder.setItems.

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

SetItems(String[], EventHandler<DialogClickEventArgs>)

Configures string entries for a dialog list with a managed click handler.

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

Parameters

items
String[]

The strings used for the dialog's list entries.

handler
EventHandler<DialogClickEventArgs>

The managed item-click handler to wrap as the dialog listener.

Returns

The result of the listener-based SetItems overload.

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

SetItems(Int32, EventHandler<DialogClickEventArgs>)

Configures a resource-backed dialog list with a managed click handler.

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

Parameters

itemsId
Int32

The array resource containing the dialog's list entries.

handler
EventHandler<DialogClickEventArgs>

The managed item-click handler to wrap as the dialog listener.

Returns

The result of the listener-based SetItems overload.

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

SetItems(ICharSequence[], 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("setItems", "([Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;", "GetSetItems_arrayLjava_lang_CharSequence_Landroid_content_DialogInterface_OnClickListener_Handler")]
public virtual Android.App.AlertDialog.Builder SetItems(Java.Lang.ICharSequence[]? items, Android.Content.IDialogInterfaceOnClickListener listener);
[<Android.Runtime.Register("setItems", "([Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;", "GetSetItems_arrayLjava_lang_CharSequence_Landroid_content_DialogInterface_OnClickListener_Handler")>]
abstract member SetItems : Java.Lang.ICharSequence[] * Android.Content.IDialogInterfaceOnClickListener -> Android.App.AlertDialog.Builder
override this.SetItems : Java.Lang.ICharSequence[] * Android.Content.IDialogInterfaceOnClickListener -> Android.App.AlertDialog.Builder

Parameters

items
ICharSequence[]

CharSequence

listener
IDialogInterfaceOnClickListener

DialogInterface.OnClickListener

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.

Android reference for android.app.AlertDialog.Builder.setItems.

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

SetItems(ICharSequence[], EventHandler<DialogClickEventArgs>)

Configures text entries for a dialog list with a managed click handler.

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

Parameters

items
ICharSequence[]

The text entries to display in the dialog list.

handler
EventHandler<DialogClickEventArgs>

The managed item-click handler to wrap as the dialog listener.

Returns

The result of the listener-based SetItems overload.

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

SetItems(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("setItems", "(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;", "GetSetItems_ILandroid_content_DialogInterface_OnClickListener_Handler")]
public virtual Android.App.AlertDialog.Builder SetItems(int itemsId, Android.Content.IDialogInterfaceOnClickListener listener);
[<Android.Runtime.Register("setItems", "(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;", "GetSetItems_ILandroid_content_DialogInterface_OnClickListener_Handler")>]
abstract member SetItems : int * Android.Content.IDialogInterfaceOnClickListener -> Android.App.AlertDialog.Builder
override this.SetItems : int * Android.Content.IDialogInterfaceOnClickListener -> Android.App.AlertDialog.Builder

Parameters

itemsId
Int32

int

listener
IDialogInterfaceOnClickListener

DialogInterface.OnClickListener

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

Android reference for android.app.AlertDialog.Builder.setItems.

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