title: Extending SupportMapFragment - how to instantiate new fragment?
body: <p>In the documentation for <code>MapFragment</code> and <code>SupportMapFragment</code> they create a new fragment by calling <code>newInstance()</code> instead of using <code>new SupportMapFragment()</code>. </p>
  
  <p>My app project extends <code>SupportMapFragment</code>, and I tried to call <code>MyMapFragment.newInstance()</code> on my fragment class, resulting in the map showing up as expected but none of my overridden methods such as <code>onCreateView()</code> and <code>onActivityCreated()</code> were being called. Took me a while before I tried instantiating my fragment by using <code>new MyMapFragment()</code> instead - and voíla, my overridden methods started getting called!</p>
  
  <p>I didn't override <code>newInstance()</code> in my class, and in hindsight it's obvious that <code>newInstance()</code> returns an instance of <code>SupportMapFragment</code>, not an instance of my extended class (duh!). </p>
  
  <p>But my question is - why <strong>is</strong> there a <code>newInstance()</code> method and why does the documentation use it, when it seems to work just as well using <code>new SupportMapFragment()</code>? What's the difference of using one or the other? I haven't been able to find the source code for SupportMapFragment, so...</p>