Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.gawst.asyncdb.adapter;
 
 
 import  android.content.Context;
 import  android.support.annotation.LayoutRes;
 import  android.support.annotation.NonNull;
import  android.support.annotation.Nullable;

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

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

Constructor for the adapter.

Parameters:
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 android.R.id.text1 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;
		array.addListener(this);
	}
	@NonNull
	protected InMemoryDbArrayList<E, ?> getDataSource() {
        return ;
    }
	public void onMemoryDbChanged(AsynchronousDbHelper<E, ?> db) {
	}
New to GrepCode? Check out our FAQ X