title: Update existing Preference-item in a PreferenceActivity upon returning from a (sub)PreferenceScreen
body: <p>I have a PreferenceActivity with a bunch of (Sub)PreferenceScreens. Each such (Sub)PreferenceScreen represents an account and has the account-username as its title.</p>
  
  <pre><code>PreferenceScreen root = mgr.createPreferenceScreen(this);
  for (MyAccountClass account : myAccounts) {
      final PreferenceScreen accScreen = mgr.createPreferenceScreen(this);
  
      accScreen.setTitle(account.getUsername());
  
      // add Preferences to the accScreen
      // (for instance a "change username"-preference)
      ...
  
      root.add(accScreen);
  }
  </code></pre>
  
  <p>As the user enters sub-PreferenceScreen, and edits the account user-name, I want the outer PreferenceScreen to update it's PreferenceScreen-title for the account in question.</p>
  
  <p>I've tried to add...</p>
  
  <pre><code>usernamePref.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
      public boolean onPreferenceChange(Preference preference, Object newValue) {
          accScreen.setTitle(newValue.toString());
          return true;
      }
  });
  </code></pre>
  
  <p>...but the accScreen.setTitle does not seem to take effect on the outer PreferenceScreen. I've note that calling <code>onContentChanged();</code> actually makes it work, but I realize that this is probably not the preferred way of doing it.</p>
  
  <p>I suspect I should call <code>postInvalidate()</code> on some view somewhere, but I really can't figure out on what view and when to do it.</p>
  
  <p><a href="https://stackoverflow.com/questions/2396153/preferencescreen-androidsummary-update">PreferenceScreen android:summary update !</a> may be experiening the same problem as me.</p>
  
  <p>Any help appreciated.</p>