title: Android onConfigurationChanged: how to save and restore fragment back stack?
body: <p>I have an activity with a dual pane: a list of menu items on the left (fragment M) and details of the currently selected item on the right (fragment D).</p>
  
  <p>When the user selects an item in fragment D, fragment D gets replaced with another fragment (let's call it D1). When the user selects an item in fragment D1, fragment D1 gets replaced with another fragment (let's call it D2), and so on.
  Of course, when the user presses the back button she can go back in the fragments history: D2->D1->D.</p>
  
  <p>My problem is: how can I save and restore the full fragment back stack upon configuration change (in particular, upon screen orientation)?</p>
  
  <p>It seems very strange to me that no one else had had this problem before, but I did not find anything about this during my searches on Google and Stack Overflow. If I missed any relevant post, please address me to it.</p>
  
  <p>I know that I could simply add the <code>android:configChanges="orientation|screenSize"</code> attribute to my activity to avoid activity recreation, but I simply cannot do that.</p>
  
  <p>The reason I cannot do that is that I am using Action Bar Sherlock (vers. 4) for backward compatibility and that component needs activity recreation to behave correctly upon configuration change, AFAIK.</p>
  
  <p>If there is another way to recreate the Action Bar Sherlock component without destroying and re-creating the activity please let me know.</p>
  
  <p>Thanks in advance.</p>