Language

AlertDialog.Builder.SetAdapter Method

Definition

Overloads

Name Description
SetAdapter(IListAdapter, EventHandler<DialogClickEventArgs>)
SetAdapter(IListAdapter, IDialogInterfaceOnClickListener)

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

SetAdapter(IListAdapter, EventHandler<DialogClickEventArgs>)

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

Parameters

adapter
IListAdapter

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

SetAdapter(IListAdapter, IDialogInterfaceOnClickListener)

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

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

Parameters

adapter
IListAdapter

ListAdapter: The ListAdapter to supply the list of items

listener
IDialogInterfaceOnClickListener

DialogInterface.OnClickListener: The listener that will be called when an item is clicked.

Returns

This Builder object to allow for chaining of calls to set methods

Attributes

Remarks

Set a list of items, which are supplied by the given ListAdapter, 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.setAdapter.

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