How to populate a recyclerView from a Room DB with filters?
What you'll see below is how I get the data from a room database to be displayed in a recyclerView.
What I would like to do is this:
@Query("SELECT * FROM item_table WHERE tag = :tag ORDER BY date ASC")
fun fetchItemsByTags(tag: String): LiveData
I don't know how to model what I already do in a way to accomplish what I want to do. If someone could help me out that woudl be awesome!
Dao:
https://i.stack.imgur.com/ZoHQ2.png▾
Repository:
<a...