Filter RecyclerView using Search View | Android

In this video you will learn how to filter list inside a recycler view.

FREE $100 credit @Digital Ocean:

#RecyclerView (Basic Setup):
Pull to Refresh in Recycler View:
Swipe gestures in Recycler View:
Drag and drop Reorder in Recycler View:



More useful videos

#CollapsingToolbar Layout:
#BottomNavigation View:

What I use
Keyboard 2:

#yoursTruly #tutorial #how-to #android


Xem thêm bài viết khác:

42 thoughts on “Filter RecyclerView using Search View | Android

  1. very nice video , 3:26 in seconds texts , instead of these texts , How can I write texts in strings.xml? sorry bad english grammer , please help me

  2. Amigo buen dia. al escribir en el SearchView borra todo pero no muestra nada, y al borrar todo el contenido del SearchView deberia mostrar la lista completa pero no muestra nada </3
    Agradezco una oportuna respuesta por fa.

  3. i just copied the code and got this error;
    Getting this Error….please help me with this;

    java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.recyclerview.widget.RecyclerView.setAdapter(androidx.recyclerview.widget.RecyclerView$Adapter)' on a null object reference

  4. Sir, i flow this code step by step,,, but sir my result is not show properly… sir please help me

  5. Awesome videos sir, could u make a video on search view in recycler view which is there in a fragment ?

  6. How to change search output text color

    Input::::: ir
    Output::: ir(color change in "ir" bcz it is searching text)on man

  7. Your just awesome sir …
    I have no words.. u tell the things really great….ese hi video dalte rahiyega

  8. Sir can you please tell me how add a fiture in recyclerview to multiple select to delete from recyclerview

  9. it is crashing when i touch the search bar with an error at
    Attempt to read from field 'java.lang.Object android.widget.Filter$FilterResults.values' on a null object reference
    typecasting error at :——-moviesList.addAll((Collection<? extends String>) filterResults.values);
    please help me

  10. My main-activity is holding 3 fragments, that holding the adapter. Any ideas what I can do? I can not call the adapter in onQueryTextChange in the main activity, because the adapter is created in the fragment. But I don't know how to pass the filtered List to my main activity, to copy it, search in it and get the filtered list back to the adapter through the fragments.

  11. que video comercial acabo de ver ???
    una farra con un puto cafe jajajaja que mierdas mas inventan pa vender algo

  12. please explain this in recyclerview item click listener please.
    last 7 days trying this but.this youtube no.not any videio this type.
    can't find any videio.please do this

    public void onClick(View v) {

    final Intent intent;
    switch (getAdapterPostion()){
    case 0:
    intent = new Intent(context, FirstActivity.class);

    case 1:
    intent = new Intent(context, SecondActivity.class);

    intent = new Intent(context, DefaultActivity.class);

  13. Sir recycleradapter.getFilter() returns an object type filter and it has two method but why did u use filter method after getfilter
    As :recycleradapter.getFilter().filter()

  14. Hello Sir !
    Here is 1 thing that doesn't work for me:
    The list contains 4 innitial tasks, added from the onCreate method.
    I added the "Add" button, which adds new tasks from the keyboard.
    If I make a search, AFTER I add some new tasks: the search is returning the correct Strings, but after the "x" is clicked, the rendered list is the innitial 4 items lists. The tasks added from the keyboard are not saved.
    Would you please help ! Thank you !

  15. hey from germany, i followed your instructions and the only problem is, when i clear the searchview, the unfiltered list is not shown. i wondering that your code works and my code not.

Leave a Reply

Your email address will not be published. Required fields are marked *