Dela via


AutoCompleteTextView.Adapter Property

Definition

Returns a filterable list adapter used for auto completion. -or- Changes the list of data used for auto completion.

public virtual 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")] [Java.Interop.JavaTypeParameters(new System.String[] { "T extends android.widget.ListAdapter & android.widget.Filterable" })] set; }
[<get: Android.Runtime.Register("getAdapter", "()Landroid/widget/ListAdapter;", "GetGetAdapterHandler")>]
[<set: Android.Runtime.Register("setAdapter", "(Landroid/widget/ListAdapter;)V", "GetSetAdapter_Landroid_widget_ListAdapter_Handler")>]
[<set: Java.Interop.JavaTypeParameters(new System.String[] { "T extends android.widget.ListAdapter & android.widget.Filterable" })>]
member this.Adapter : Android.Widget.IListAdapter with get, set

Property Value

a data adapter used for auto completion

Attributes

Remarks

Property getter documentation:

Returns a filterable list adapter used for auto completion.

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

Property setter documentation:

Changes the list of data used for auto completion. The provided list must be a filterable list adapter.

The caller is still responsible for managing any resources used by the adapter. Notably, when the AutoCompleteTextView is closed or released, the adapter is not notified. A common case is the use of android.widget.CursorAdapter, which contains a android.database.Cursor that must be closed. This can be done automatically (see android.app.Activity#startManagingCursor(android.database.Cursor) startManagingCursor()), or by manually closing the cursor when the AutoCompleteTextView is dismissed.

Java documentation for android.widget.AutoCompleteTextView.setAdapter(T).

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