public abstract class FilteredArrayAdapter<T>
extends android.widget.ArrayAdapter<T>
Based on gist FilteredArrayAdapter by Tobias Schürg
Created on 9/17/13.
| Constructor and Description |
|---|
FilteredArrayAdapter(android.content.Context context,
int resource,
int textViewResourceId,
java.util.List<T> objects)
Constructor
|
FilteredArrayAdapter(android.content.Context context,
int resource,
int textViewResourceId,
T[] objects)
Constructor
|
FilteredArrayAdapter(android.content.Context context,
int resource,
java.util.List<T> objects)
Constructor
|
FilteredArrayAdapter(android.content.Context context,
int resource,
T[] objects)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
android.widget.Filter |
getFilter() |
protected abstract boolean |
keepObject(T obj,
java.lang.String mask)
Filter method used by the adapter.
|
add, addAll, addAll, clear, createFromResource, getAutofillOptions, getContext, getCount, getDropDownView, getDropDownViewTheme, getItem, getItemId, getPosition, getView, insert, notifyDataSetChanged, remove, setDropDownViewResource, setDropDownViewTheme, setNotifyOnChange, sortareAllItemsEnabled, getItemViewType, getViewTypeCount, hasStableIds, isEmpty, isEnabled, notifyDataSetInvalidated, registerDataSetObserver, setAutofillOptions, unregisterDataSetObserverpublic FilteredArrayAdapter(android.content.Context context,
int resource,
T[] objects)
context - The current context.resource - The resource ID for a layout file containing a TextView to use when
instantiating views.objects - The objects to represent in the ListView.public FilteredArrayAdapter(android.content.Context context,
int resource,
int textViewResourceId,
T[] objects)
context - The current context.resource - The resource ID for a layout file containing a layout to use when
instantiating views.textViewResourceId - The id of the TextView within the layout resource to be populatedobjects - The objects to represent in the ListView.public FilteredArrayAdapter(android.content.Context context,
int resource,
java.util.List<T> objects)
context - The current context.resource - The resource ID for a layout file containing a TextView to use when
instantiating views.objects - The objects to represent in the ListView.public FilteredArrayAdapter(android.content.Context context,
int resource,
int textViewResourceId,
java.util.List<T> objects)
context - The current context.resource - The resource ID for a layout file containing a layout to use when
instantiating views.textViewResourceId - The id of the TextView within the layout resource to be populatedobjects - The objects to represent in the ListView.@NonNull public android.widget.Filter getFilter()
getFilter in interface android.widget.FilterablegetFilter in class android.widget.ArrayAdapter<T>protected abstract boolean keepObject(T obj, java.lang.String mask)
obj - object we are checking for inclusion in the adaptermask - current text in the edit text we are completing against