SearchAdapter¶
-
public class
SearchAdapter
<T extends Listable> extends ArrayAdapter<T> implements Filterable¶ Populates a displayed list with items
Parameters: - <T> – Type of item to put in the list
Constructors¶
SearchAdapter¶
-
public
SearchAdapter
(Context context, int resource, int listViewID, List<T> items)¶ Initialize instance fields with provided parameters
Parameters: - context – {@inheritDoc}
- resource – {@inheritDoc}
- listViewID – Identifier for list the adapter will populate
- items – {@inheritDoc}
Methods¶
addAll¶
-
public void
addAll
(Collection<? extends T> collection)¶ Add all items in a
Collection
to the list of items the adapter displays in the listParameters: - collection – Items to add to the list
getItem¶
-
public T
getItem
(int position)¶ Get the item associated with the list entry at a certain position
Parameters: - position – Position of list item
Returns: The object represented at the specified position