List of usage examples for android.preference ListPreference getSummary
@Override
public CharSequence getSummary()
From source file:com.hichinaschool.flashcards.anki.Preferences.java
private void updateListPreference(String key) { ListPreference listpref = (ListPreference) getPreferenceScreen().findPreference(key); String entry;/* w w w . ja v a 2s . co m*/ try { entry = listpref.getEntry().toString(); } catch (NullPointerException e) { Log.e(AnkiDroidApp.TAG, "Error getting set preference value of " + key + ": " + e); entry = "?"; } if (mListsToUpdate.containsKey(key)) { listpref.setSummary(replaceString(mListsToUpdate.get(key), entry)); } else { String oldsum = (String) listpref.getSummary(); if (oldsum.contains("XXX")) { mListsToUpdate.put(key, oldsum); listpref.setSummary(replaceString(oldsum, entry)); } else { listpref.setSummary(entry); } } }