In my code I've used the Preference.setSummary()
method to change the summary line of a setting to a certain string. In my main activity when I need to retrieve this setting's value I call the getString(key)
method on the SharedPreferences
object, where key
is the key of an EditTextPreference
.
Now I really wonder if setSummary
also sets the value of a preference in SharedPreferences
by the same key to the value that I pass to setSummary
, because I really never created a SharedPreferences.Editor
object and called a putString
method on it explicitly.
The docs don't say anything specific other than:
Sets the summary for this Preference with a CharSequence.
Parameters
summary The summary for the preference.