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