private void bindPreferenceSummaryToValue(Preference preference) {
        // Set the listener to watch for value changes.
        preference.setOnPreferenceChangeListener(this);

        // Set the preference summaries
        setPreferenceSummary(preference,
                PreferenceManager
                        .getDefaultSharedPreferences(preference.getContext())
                        .getString(preference.getKey(), ""));
    }
Attaches a listener so the summary is always updated with the preference value.
Also fires the listener once, to initialize the summary (so it shows up before the value
is changed.)
app/src/main/java/com/example/android/sunshine/app/SettingsActivity.java