PreferenceActivity, Headers, and onDestroy being called when the activity is visible
<p>I'm running into a bit of a problem.</p>

<p>I have a PreferenceActivity with a list of headers, each pointing to a fragment. Those fragments are shown as a single pane (small display).</p>

<p>In order to exit a header fragment and go back to the list of headers of the PreferenceActivity itself, I press the back button (as a user), or call <code>getActivity().onBackPressed()</code> if I need to get back to the list after the user pressed a button on the UI.</p>

<p>This brings me back to the header list PreferenceActivity, but it also calls the <code>onDestroy()</code> method of that activity.</p>

<h3>This is what I don't understand:</h3>

<p>Why does it call the <code>onDestroy()</code> when the activity itself is clearly visible? And why doesn't it call the <code>onCreate()</code> after that, again, since the activity is visible?</p>

<p>This also has a side effect of calling the <code>onReset()</code> of a loader I use to create the list of data that produces the headers in the first place. That in turn makes it look like the header list hasn't changed, even when I have removed an item from the list, and thus reduced the number of headers. If I actually close and reopen the PreferenceActivity, the header list will be correct, which shows that the loader itself is working.</p>
