Code example for ListPreference

Methods: getValuesetSummarysetOnPreferenceChangeListener

0
	} 
 
	public class SetSummararyByListPreferenceValue implements OnPreferenceChangeListener {
 
		public SetSummararyByListPreferenceValue(ListPreference lp) {
			lp.setSummary(lp.getValue());
			lp.setOnPreferenceChangeListener(this);
		} 
		 
		@Override 
		public boolean onPreferenceChange(Preference preference, Object newValue) {
			preference.setSummary((String)newValue);
			return true; 
		} 
		 
	} 
	 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE