Posts

Showing posts with the label sharedpreferences

Save ArrayList to SharedPreferences

Save ArrayList to SharedPreferences I have an ArrayList with custom objects. Each custom object contains a variety of strings and numbers. I need the array to stick around even if the user leaves the activity and then wants to come back at a later time, however I don't need the array available after the application has been closed completely. I save a lot of other objects this way by using the SharedPreferences but I can't figure out how to save my entire array this way. Is this possible? Maybe SharedPreferences isn't the way to go about this? Is there a simpler method? ArrayList SharedPreferences SharedPreferences You can find Answer here : stackoverflow.com/questions/14981233/… – Apurva Kolapkar Oct 25 '16 at 10:10 this is the complete example go through the url stackoverflow.com/a/41137562...