(Today, I learned about data storage, made a small program, and practiced sharedPreferences to store data, which is relatively simple. Then I want to exit the program. I checked the code of exiting the program after pressing the Back button twice on the Internet. Some bugs can be corrected and normal functions can be realized. In fact, Android does not cover SQL databases. It also has SharedPreferences storage methods. Here is a small example to show you how to use SharedPreferences. This document includes the following annexes:
DataStore\bin\classes\com\learn\DataStoreActivity$1.class
DataStore\bin\classes\com\learn\DataStoreActivity$2.class
DataStore\bin\classes\com\learn\DataStoreActivity$task.class
DataStore\bin\classes\com\learn\DataStoreActivity.class
DataStore\bin\classes\com\learn\R$attr.class
DataStore\bin\classes\com\learn\R$drawable.class
DataStore\bin\classes\com\learn\R$id.class
DataStore\bin\classes\com\learn\R$layout.class
DataStore\bin\classes\com\learn\R$string.class
DataStore\bin\classes\com\learn\R.class
DataStore\bin\res\drawable-hdpi\ic_ launcher.png
DataStore\bin\res\drawable-ldpi\ic_ launcher.png
DataStore\bin\res\drawable-mdpi\ic_ launcher.png
DataStore\bin\classes.dex
DataStore\bin\DataStore.apk
DataStore\bin\resources.ap_
DataStore\gen\com\learn\R.java
DataStore\res\drawable-hdpi\ic_ launcher.png
DataStore\res\drawable-ldpi\ic_ launcher.png
DataStore\res\drawable-mdpi\bg.jpg
DataStore\res\drawable-mdpi\ic_ launcher.png
DataStore\res\layout\main.xml
DataStore\res\values\strings.xml
DataStore\src\com\learn\DataStoreActivity.java
DataStore\.classpath
DataStore\.project
DataStore\AndroidManifest.xml
DataStore\proguard.cfg
DataStore\project.properties
..... Too many files omitted)