Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.gawst.asyncdb.adapter;
 import  android.content.Context;

A ListAdapter that only shows a subset of elements in a InMemoryDbArrayList using the org.gawst.asyncdb.adapter.InMemoryFilteredAdapter.InMemoryFilter

<E> Type of the elements stored in the InMemoryDbArrayList
public class InMemoryFilteredListAdapter<E> extends InMemoryFilteredAdapter<E> implements InMemoryDbListener<E> {
	private final InMemoryDbArrayList<E, ?> mArray;

Constructor for the adapter.

context Context used to get the layout inflater.
array The data source, monitored for changes.
layoutResourceId The layout to inflate to display an element. It must contain a TextView element with id unless you inflate the View yourself.
filter Filter to apply to the data source before it's displayed.
	public InMemoryFilteredListAdapter(@NonNull Context context, @NonNull InMemoryDbArrayList<E, ?> array, @LayoutRes int layoutResourceId, @Nullable InMemoryFilter<E> filter) {
		super(contextgetFilteredData(arrayfilter), layoutResourceIdfilter);
		this. = array;
	protected InMemoryDbArrayList<E, ?> getDataSource() {
        return ;
	public void onMemoryDbChanged(AsynchronousDbHelper<E, ?> db) {
New to GrepCode? Check out our FAQ X