开发者

Saving and Adding to A List (Android)

开发者 https://www.devze.com 2023-02-21 04:39 出处:网络
Plain and, hopefully simply... -What I would like to do is make a l开发者_StackOverflow社区ist of strings.

Plain and, hopefully simply...

-What I would like to do is make a l开发者_StackOverflow社区ist of strings.

-I would like to add to this list while in the application.

-Finally, I want to get each String from this list.

This must be saved somehow so that when you close it and open it back up, the list will save... How should I get around to this? SharedPreferences? An SQL Database? What should I use to accomplish this?


I vote SharedPreferences since it will be faster and will persist throughout the life span of the application.

If you need to have the saved data made available during the next time the app is run, you will most likely want to use a DB

0

精彩评论

暂无评论...
验证码 换一张
取 消