Stack Overflow archive
0 score

Save Arraylist of custom objects SharedPreferences

score
0
question views
791
license
CC BY-SA 3.0

I would look into storing the data into a SQLiteDatabase. SharedPreferences wasn't intended to save custom objects. If you really want to use SharedPreferences then Gson will be the best solution. API 11 added the ability to save a list of strings, not objects.

Originally posted on Stack Overflow. Public user contributions are licensed under Creative Commons Attribution-ShareAlike.