Fragment re-instantiation on activity restart
<p>As a follow-up to my previous issue <a href="http://stackoverflow.com/questions/8275571/android-fragment-re-instantiation-error">Android Fragment Re-Instantiation Error</a> I am reporting on what I've discovered in debugging. I may have a non-standard app architecture, but I'm still surprised at this behavior. I should also comment that I am doing this work on Android V2.2 using the Compatibility Library V4.</p>

<p>My fragments are all dynamic. That is, I initially create them as new Fragment objects and add them to a container view with <code>ft.add()</code>. Works great. Prior to converting to frames, I was handling screen rotation by simply starting over from scratch in my activity's onCreate to inflate my various views, etc., since the layout is different for landscape vs. portrait.</p>

<p>Using fragments, however, I discovered that Android itself is re-instantiating my fragment objects when I call <code>super.onCreate()</code> in my own onCreate method. Since I'm creating everything over again, I have no need for these fragments and in fact I really don't know where they are being "kept" after being created. They don't seem to interfere with the new views and fragments that I create after the restart, but if I rotate the screen again I now see <em>two</em> previous fragments being created by the framework, and so on.</p>

<p>So what I did to "solve" this issue was to do <code>fm.findFragmentByTag()</code> calls at startup and then a <code>ft.remove()</code> transaction if a fragment is found. This is now working.</p>
