I have a EditTextPreference and I don't know when that string get saved to the Shared Preferences file.
If I start with a null string, and change it to "Hello", when does this update get saved? Do I have to save it manually?
I have a EditTextPreference and don't know when it commits that string to the Shared Preferences file
If you take a look at the EditTextPreference documentation, the text gets saved upon calling the setText(String)
method. This method commits saves the text to the SharedPreferences. The preferences will never be updated until you call that method. For example...
EditTextPreference mPrefs = ...
//perform any manipulations on the string, not saved until you call setText()
String mText = "2";
mText += " + 2";
mText += " = 4";
// saves "2 + 2 = 4" to SharedPreferences
mPrefs.setText(mText);