Android Activity/PreferenceFragment lifecycle?

view full story

http://stackoverflow.com – I have a very simple preferences setup in which a PreferenceFragment is added to an Activity. The Activity is also an OnSharedPreferenceChangeListener, since I want to update the summary of a particular preference whenever that preference is updated. Here's the Activity: public class PrefsActivity extends Activity implements OnSharedPreferenceChangeListener { private static final String PREF_KEY = "key goes here"; private PrefsFragment pf; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); pf = new PrefsFragmen (HowTos)