Updating a RecyclerView by a new LiveData<List> return from Room dynamically
问题 I have a conventional Room->DAO->Livedata->Repositiry->ViewModel->RecyclerView app. Different buttons of UI must pass different lists of data to RecyclerView. By button click I want: Make new @Query in DAO and get new LiveData<`List> object in return. Put this new data into the RecyclerViewAdapter and call notifyDataSetChanged () to make new List visuals. The Dao @Query: @Query("SELECT * FROM entry_table WHERE path LIKE :path ORDER BY priority DESC") LiveData<List<Entry>> getNotesOfFolder