• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Saving Edittext upon return to activity

Change

Lurker
Hi all,

I am currently working on an application with a lot of editText objects (around 20) it all works great however upon exiting the fragment which holds the editText, or exiting the application all text is lost.

How would I go about saving the values until the application is shutdown or the user overrides those? Would I be using sharedpreferences or any other method?

Thanks in advance,
-Change
 
For simple key/value data, then shared preferences is probably the way to do it.

The other option would be using a database, but that is generally for more complex data structures and relationships, and for your case would probably be overkill.
 
For simple key/value data, then shared preferences is probably the way to do it.

The other option would be using a database, but that is generally for more complex data structures and relationships, and for your case would probably be overkill.

Hmm I'll find a way to use shared preferenes then :)
Thanks LV
 
Back
Top Bottom