CaptionsMaker
.com
How to Filter a RecyclerView with SearchView - Android Studio Tutorial
Edit Subtitles
Download Subtitles
SRT
TXT
Title:
Description:
In this video we will learn how to use the SearchView widget to filter a RecyclerView in real time. For this we will add the SearchView as an item to our options menu and make it expandable with the collapseActionView attribute. This way we can display it as an icon in our app bar, which expands to an input field when we click on it. We implement the Filterable interface into our RecyclerView Adapter and create our own Filter, where we handle the filter logic in the asynchronous performFiltering method, which publishes the search results to the publishResults method on the UI thread. In our Activity we then connect our SearchView with the Filter by setting an OnQueryTextListener onto our SearchView and listening for the text input in onQueryTextChange. Example code: https://codinginflow.com/tutorials/android/searchview-recyclerview ____________________ ❗ Subscribe to the channel: https://www.youtube.com/c/codinginflow?sub_confirmation=1 ⏯ Watch more tutorials: https://www.youtube.com/c/codinginflow/playlists ㊙ Help translating the videos: http://www.youtube.com/timedtext_cs_panel?c=UC_Fh8kvtkVPkeihBs42jGcA&tab=2 💚 Support the content: https://codinginflow.com/support-the-content 💬 Join the Discord chat: https://discord.gg/TSnMvmc 🎧 Audiobooks and podcasts for programmers: https://codinginflow.com/audiobooks-podcasts-programmer 👶 How to get started with Android development: https://codinginflow.com/learn-android-development-complete-beginner 📣 Follow Coding in Flow on social media: Facebook: https://www.facebook.com/codinginflow Instagram: https://www.instagram.com/codinginflow Twitter: https://twitter.com/codinginflow Blog: https://codinginflow.com
YouTube url:
https://www.youtube.com/watch?v=sJ-Z9G0SDhc
Created:
17. 12. 2019 20:07:46