How do I change the contents of a preference dialog when it is tapped?
<p>I have implemented the onPreferenceClick(Preference) callback interface</p>

<pre><code>    public boolean onPreferenceClick(Preference arg0) {

 if (arg0 instanceof ListPreference){
  addListPreferenceEntriesFromStore((ListPreference) arg0, getSharedPreferences("cfn_preferences", MODE_PRIVATE));
 }

 else if (arg0 instanceof EditTextPreference){
  ((EditTextPreference)arg0).setTitle("Hallabalooo");
  ((EditTextPreference)arg0).setDialogTitle("Tjillevipp");
 }

 return true;
}
</code></pre>

<p>When I tap the EditTextPreference for the first time the title, in the PreferenceScreen, is changed as expected but the dialog title isn't. The second time I tap the EditTextPreference the dialog title is also updated.</p>

<p>I experience the same behaviour with the ListPreference. The addListPreferenceEntriesFromStore() method updates the contents of the ListPreference, but the change isn't visible the first time the ListPreference is displayed.</p>

<p>It seems like changes made to the dialog part of a preference during the context of the onPreferenceClick() callback doesn't show.</p>

<p>What is it I do wrong here? Or is there a workaround?</p>

<p>Thankful for any help</p>

<p>/Mathias</p>
