How to add recyclerview item in favorites Activity

1k views Asked by At

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?

1

There are 1 answers

4
Orgesa On

When you click on the button you can save the favorite state to your sqlite database table, and then call notifyDataSetChanged() or notifyItemChanged(position) on the RecyclerViews Adapter this will update the data on the RecyclerView