onSaveInstanceState() in activity and fragments?
<p>I have an activity which contains 2 fragments. I want to save certain state of the activity and also of the fragments, in order to restore if the activity, or the fragments, are destroyed.</p>

<p>So I'm using onSaveInstanceState both in the fragments and in the activity, and take the data of the bundle passed to onCreate or onCreateView.</p>

<p>This works well besides, when the activity is destroyed. Then in restores it's own data, but, since in onCreate() I instantiate the adapter and the fragments again, they get no state.</p>

<p>How do I solve this?</p>

<p>Thanks in advance.</p>
