title: Prevent Fragment recovery in Android
body: <p>We are using Fragments and we don't need them to be automatically recovered when the Activity is recreated.
  But Android every time when <code>Activity::onCreate(Bundle savedInstanceState)</code> -> <code>super.onCreate(savedInstanceState)</code> is called, restores Fragments even if we use setRetainInstance(false) for those Fragments.</p>
  
  <p>Moreover, in those <code>Fragments</code> <code>Fragment.performCreateView()</code> is called directly without going through <code>Fragment::onAttach()</code> and so on. Plus, some of the fields are null inside restored <code>Fragment</code>...</p>
  
  <p>Does anybody know how to prevent Android from restoring fragments?</p>
  
  <p>P.S. We know that in case of recreating Activity for config changes it could be done by adding to manifest a<code>ndroid:configChanges="orientation|screenSize|screenLayout</code>. But what about recreating activity in case of automatic memory cleaning?</p>