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).
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.
My problem is: how can I save and restore the full fragment back stack upon configuration change (in particular, upon screen orientation)?
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.
I know that I could simply add the android:configChanges="orientation|screenSize"
attribute to my activity to avoid activity recreation, but I simply cannot do that.
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.
If there is another way to recreate the Action Bar Sherlock component without destroying and re-creating the activity please let me know.
Thanks in advance.