@@ -0,0 +1,1905 @@
+package com.andela.voluminotesapp.utilities;%0A%0Aimport android.content.Context;%0Aimport android.widget.Filter;%0A%0Aimport com.andela.notelib.note.Note;%0Aimport com.andela.notelib.note.NoteList;%0Aimport com.andela.notelib.note.PaperNote;%0Aimport com.andela.voluminotesapp.activities.MyApplication;%0Aimport com.andela.voluminotesapp.adapters.NotesRecyclerAdapter;%0A%0A/**%0A * Created by andela on 2/14/16.%0A */%0Apublic class SearchFilter extends Filter %7B%0A    private NotesRecyclerAdapter notesRecyclerAdapter;%0A    private NoteList%3CNote%3E notes;%0A%0A    public SearchFilter(Context context, NotesRecyclerAdapter notesRecyclerAdapter) %7B%0A        this.notesRecyclerAdapter = notesRecyclerAdapter;%0A        this.notes = MyApplication.getNoteManager(context).getAllNotes();%0A    %7D%0A%0A    @Override%0A    protected FilterResults performFiltering(CharSequence constraint) %7B%0A        NoteList%3CNote%3E resultNote = new NoteList%3C%3E();%0A        FilterResults filterResults = new FilterResults();%0A%0A        String query = constraint.toString().trim().toLowerCase();%0A        if (!query.isEmpty())%7B%0A            for (Note note : this.notes)%7B%0A                if (note instanceof PaperNote) %7B%0A                    PaperNote paperNote = (PaperNote) note;%0A                    if (paperNote.getTitle().trim().toLowerCase().contains(query)%0A                            %7C%7C paperNote.getNote().trim().toLowerCase().contains(query)) %7B%0A                        resultNote.addNote(paperNote);%0A                    %7D%0A                %7D%0A            %7D%0A        %7D else%0A            resultNote.clear();%0A%0A%0A        filterResults.values = resultNote;%0A        filterResults.count = resultNote.size();%0A        return filterResults;%0A    %7D%0A%0A    @Override%0A    protected void publishResults(CharSequence constraint, FilterResults results) %7B%0A        this.notesRecyclerAdapter.setNoteList((NoteList%3CNote%3E) results.values);%0A        this.notesRecyclerAdapter.notifyDataSetChanged();%0A    %7D%0A%7D%0A

Add SearchFilter Class