// For all preferences, attach an OnPreferenceChangeListener so the UI summary can be
// updated when the preference changes.
bindPreferenceSummaryToValue(findPreference(getString(R.string.pref_location_key)));
+ bindPreferenceSummaryToValue(findPreference(getString(R.string.pref_units_key)));
+
}
/**
@Override
public boolean onPreferenceChange(Preference preference, Object value) {
- String stringValue = value.toString();
+ String stringValue = value.toString().trim();
if (preference instanceof ListPreference) {
// For list preferences, look up the correct display value in