title: What mechanism causes a View.onSaveInstanceState to be called in Fragment to Fragment navigation?
body: <p>There is a lot of noise surrounding this subject on SO and Google, so bear with me.</p>
  
  <p>When performing <strong>Fragment to Fragment</strong> navigation, you see this lifecycle:</p>
  
  <pre><code>Fragment1: onPause
  Fragment1: onStop
  Fragment1: onDestroyView
  
  Fragment2: onCreateView
  Fragment2: onStart
  Fragment2: onResume
  </code></pre>
  
  <p>(You can see this in this picture stolen from <a href="https://bricolsoftconsulting.com/state-preservation-in-backstack-fragments/" rel="nofollow noreferrer">here</a>)
  <a href="https://i.stack.imgur.com/nCAWr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nCAWr.png" alt="enter image description here"></a></p>
  
  <p>There is no call to a <code>Fragment.onSaveInstanceState</code> as the Fragment instance is still alive - only it's view has been destroyed. </p>
  
  <p><em>What mechanism therefore is saving the View's state and restoring it, and how?</em></p>