I am creating an app to introduce videos.
I would like to check the check box for videos that users like, so that they can keep the check status even if they close the app.
The XML file allows you to display a check box, but how do I include the above features?
The development environment is Android Studio and the language is Java.
android
There are several ways, but using DB is the best way.
For example, create and manage your favorite tables.
Once checked, insert it into your favorite table.
If unchecked, remove it from the Favorites table.
If you restart the app, check the check box of the videos in the Favorites table in the initial display.
There are several DB libraries, so please refer to here to choose one that is easy to use.
I personally recommend Realm.
© 2024 OneMinuteCode. All rights reserved.