다음을 통해 공유


ListView.Adapter Property

Definition

Returns the adapter currently in use in this ListView. -or- Sets the data behind this ListView.

public override Android.Widget.IListAdapter? Adapter { [Android.Runtime.Register("getAdapter", "()Landroid/widget/ListAdapter;", "GetGetAdapterHandler")] get; [Android.Runtime.Register("setAdapter", "(Landroid/widget/ListAdapter;)V", "GetSetAdapter_Landroid_widget_ListAdapter_Handler")] set; }
[<get: Android.Runtime.Register("getAdapter", "()Landroid/widget/ListAdapter;", "GetGetAdapterHandler")>]
[<set: Android.Runtime.Register("setAdapter", "(Landroid/widget/ListAdapter;)V", "GetSetAdapter_Landroid_widget_ListAdapter_Handler")>]
member this.Adapter : Android.Widget.IListAdapter with get, set

Property Value

The adapter currently used to display data in this ListView.

Attributes

Remarks

Property getter documentation:

Returns the adapter currently in use in this ListView. The returned adapter might not be the same adapter passed to #setAdapter(ListAdapter) but might be a WrapperListAdapter.

Java documentation for android.widget.ListView.getAdapter().

Property setter documentation:

Sets the data behind this ListView.

The adapter passed to this method may be wrapped by a WrapperListAdapter, depending on the ListView features currently in use. For instance, adding headers and/or footers will cause the adapter to be wrapped.

Java documentation for android.widget.ListView.setAdapter(android.widget.ListAdapter).

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

See also