I have Android application that stores information from SQLite
database in a RecyclerView
. I have a button on every RecyclerView
item that when clicked on should add the item to favorites, this list of favorites must be avaible to the user when needed. a bit like whatsapp or gmail.
How to implement this please?
When you click on the button you can save the favorite state to your sqlite database table, and then call
notifyDataSetChanged()
ornotifyItemChanged(position)
on the RecyclerViewsAdapter
this will update the data on theRecyclerView