1. Are you ready for the Galaxy S20? Here is everything we know so far!

Saving Edittext upon return to activity

Discussion in 'Android Development' started by Change, Feb 1, 2016.

  1. Change

    Change Lurker
    Thread Starter

    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
     



    1. Download the Forums for Android™ app!


      Download

       
  2. Deleted User

    Deleted User Guest

    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.
     
  3. Change

    Change Lurker
    Thread Starter

    Hmm I'll find a way to use shared preferenes then :)
    Thanks LV
     
Loading...

Share This Page

Loading...