samedi 21 mai 2022

how to save checkbox state in android

I'm working on an android cooking app (using java) and the homepage has a recycler view populated with recipes which users can like (similar to FaceBook posts). The like button is a checkbox, what is the best way to save the state of the like checkbox for every recipe, so when the user signs out of the app and sign in again they will not like the same recipe more than one time.

Is using SharedPreference a good idea in this situation?

**im using MySql as a database and firebase is not used.




Aucun commentaire:

Enregistrer un commentaire