Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View randypfohl's full-sized avatar
Love this stuff

Randy Pfohl randypfohl

Love this stuff
View GitHub Profile
@randypfohl
randypfohl / Asynchronous Cursor Filter
Created November 18, 2017 00:26
Built with the idea of large data and not wanting to re-instantiate data after pulling form a database. Easily changed to support more efficient filtering based on previous results
import android.database.Cursor;
import android.database.CursorWrapper;
import android.os.AsyncTask;
import android.util.Log;
// todo optimize this to not filter through entire array for continuous entries or deletions
public class FilterableGuestCursor extends CursorWrapper {
public static String TAG = FilterableGuestCursor.class.getSimpleName();
FilterListener mFilterListener;
private String filter;