I have a MainActivity
that shows a Fragment
containing a RecyclerView
.
I am loading data from SQL using an Asynctask
, all the data shows perfectly.
What I want to know is, I've got a search icon in my toolbar inflated in the MainActivity
, when the user clicks on it and enters data, it should filter through the RecyclerView
in the Fragment
.
I have already implemented SearchView.OnQueryTextListener
in the MainActivity
, I've also implemented methods onQueryTextChange()
and onQueryTextSubmit()
. I just don't know how to filter the RecyclerView
in the Fragment
directly using the search in the MainActivity
.