preferences show current values in summary
This commit is contained in:
		| @@ -178,7 +178,7 @@ public class DatePreference extends DialogPreference implements | ||||
|  | ||||
| 	private void persistDate(String s) { | ||||
| 		persistString(s); | ||||
| 		//setSummary(summaryFormatter().format(getDate().getTime())); | ||||
| 		setSummary(summaryFormatter().format(getDate().getTime())); | ||||
| 	} | ||||
| 	 | ||||
| 	/** | ||||
|   | ||||
| @@ -71,6 +71,7 @@ public class WaldemarPreferences extends PreferenceActivity { | ||||
|  | ||||
|         final EditTextPreference pref_name = (EditTextPreference)findPreference("pref_name"); | ||||
|         final ListPreference pref_mode = (ListPreference)findPreference("pref_mode"); | ||||
|         final EditTextPreference pref_duration = (EditTextPreference)findPreference("pref_duration"); | ||||
|  | ||||
|         String val = pref_mode.getValue(); | ||||
| 		enableDisablePreferences(val); | ||||
| @@ -88,6 +89,12 @@ public class WaldemarPreferences extends PreferenceActivity { | ||||
|         		return true; | ||||
|         	} | ||||
|         }); | ||||
|         pref_duration.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() { | ||||
|         	public boolean onPreferenceChange(Preference preference, Object newValue) { | ||||
|         		pref_duration.setSummary((CharSequence)newValue); | ||||
|         		return true; | ||||
|         	} | ||||
|         }); | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|   | ||||
		Reference in New Issue
	
	Block a user