Udostępnij za pośrednictwem


AlertDialog.Builder.SetAdapter Method

Definition

Overloads

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

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

The IListAdapter to supply the list of items

listener
IDialogInterfaceOnClickListener

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

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