title: RecyclerView List items Search using EditText implementing filterable do not work
body: <p><strong>SearchListAdapter.java</strong></p>
  
  <p>RecyclerView List Search using EditText implementing filterable do not work. Please check out this code. Here in my case the list is filtered but recyclerView adapter is not changed due to which list remains same.</p>
  
  <pre><code>/**
   * Created by Dell on 4/8/2016.
   */
  public class SearchListAdapter extends RecyclerView.Adapter&lt;SearchListAdapter.ViewHolder&gt; implements Filterable {
  
      private Context context;
      public static ArrayList&lt;ChapterListModel&gt; chapterList;
  
      private List&lt;ChapterListModel&gt; orignalChapterList = new ArrayList&lt;&gt;();
      private final List&lt;ChapterListModel&gt; filteredChapterList;
  
      public SearchListAdapter(Context context, ArrayList&lt;ChapterListModel&gt; chapterList) {
          this.context = context;
          this.chapterList = chapterList;
          orignalChapterList = chapterList;
          filteredChapterList = new ArrayList&lt;&gt;();
  
      }
  
  
      @Override
      public SearchListAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
          return new ViewHolder(
                  LayoutInflater.from(parent.getContext()).inflate(R.layout.single_row_chapter_list, parent, false)
          );
      }
  
      @Override
      public void onBindViewHolder(ViewHolder holder, final int position) {
  
          holder.title.setText(chapterList.get(position).getTitle());
      }
  
  
      @Override
      public int getItemCount() {
          return chapterList.size();
      }
  
      @Override
      public Filter getFilter() {
          return new CustomFilter(this, orignalChapterList);
      }
  
      public class ViewHolder extends RecyclerView.ViewHolder  {
  
          TextView title;
  
          public ViewHolder(View itemView) {
              super(itemView);
              title = (TextView) itemView.findViewById(R.id.textView);
          }
      }
  
      public class CustomFilter extends Filter {
          private SearchListAdapter adapter;
          private final List&lt;ChapterListModel&gt; originalList;
          private final List&lt;ChapterListModel&gt; filteredList;
  
          private CustomFilter(SearchListAdapter adapter, List&lt;ChapterListModel&gt; originalList) {
              super();
              this.adapter = adapter;
              this.originalList = new LinkedList&lt;&gt;(originalList);
              this.filteredList = new ArrayList&lt;&gt;();
          }
  
          @Override
          protected FilterResults performFiltering(CharSequence constraint) {
              filteredList.clear();
              final FilterResults results = new FilterResults();
  
              if (constraint.length() == 0) {
                  filteredList.addAll(originalList);
              } else {
                  final String filterPattern = constraint.toString().toLowerCase().trim();
  
                  for (final ChapterListModel chapter : originalList) {
                      if (chapter.getTitle().contains(filterPattern)) {
                          filteredList.add(chapter);
                      }
                  }
              }
              results.values = filteredList;
              results.count = filteredList.size();
              return results;
          }
  
          @Override
          protected void publishResults(CharSequence constraint, FilterResults results) {
              adapter.filteredChapterList.clear();
              adapter.filteredChapterList.addAll((List&lt;ChapterListModel&gt;) results.values);
              adapter.notifyDataSetChanged();
          }
      }
  }
  </code></pre>