How to use maintain string saved in SharedPreferences : I am trying to create a simple to-do list style app. I have defined the SharedPrferences and saved the user entered string from a TextField in my main activity. How do you make sure that the string stays attached to the textfield(aka does not disappear) when closed, until deleted or changed by the user?