title: Changing a Preference' Summary
body: <p>I'm still looking for a way to change the summary of a ListPreference according to its current value. After some research I managed to get it (partially) working:</p>
  
  <pre><code> ListPreference pref = (ListPreference) findPreference("Repeat_PREFS");
  
      pref.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
  
          public boolean onPreferenceChange(Preference preference, Object val) {
  
              ListPreference pref = (ListPreference) findPreference("Repeat_PREFS");
  
              pref.setSummary(pref.getEntry());
              return true;
          }
  
      });
  </code></pre>
  
  <p>The problem is that when I select a value for the first time, the summary changes to some other value or doesn't change at all. When I select the same value for the 2nd time, the summary is set correctly. What am I doing wrong? </p>