lundi 1 octobre 2018

Andoid: Store CheckBox state in CheckList for different days

My app is a simple checklist. If I click a checkbox and close the app, the checkbox state will be saved and reloaded when restarting. But now I want to add a calendar that can be used to pick a date. For each new day the default state of the checkboxes in the list should be unchecked. If the state of the checkbox changes it should be saved for this specific date. So if I close the app and choose the same day again the checkbox states should be reloaded. So how do I save the checkbox state dependent on the date and dependent on which checkbox is clicked in the listview? And can I still do this with sharedPreferences? Or should I use SQLite, because one year of usage would result in 3650 saved checkbox states (assuming my checklist contains around 10 items).




Aucun commentaire:

Enregistrer un commentaire