title: MapFragment inside Fragment only works on rotation
body: <p>I have a problem with MapFragment. The problem is the map works first time i open fragment, but when I leave it (I have sidebar menu) and come back - the screen is just white. But then if i rotate my phone the map shows up.
  From debug I can see that this happens when I either enter first time or rotate, but it doesn't happen when I come back to fragment.</p>
  
  <pre><code>02-13 08:27:37.263: I/dalvikvm-heap(4553): Grow heap (frag case) to 23.106MB for 4194320-byte allocation
  02-13 08:27:37.283: D/dalvikvm(4553): GC_FOR_ALLOC freed &lt;1K, 18% free 23629K/28748K, paused 12ms, total 12ms
  02-13 08:27:37.323: D/dalvikvm(4553): GC_FOR_ALLOC freed 4356K, 21% free 19534K/24648K, paused 13ms, total 13ms
  </code></pre>
  
  <p>Here is java code for fragment onCreateView:</p>
  
  <pre><code>public View onCreateView(LayoutInflater inflater, ViewGroup container,
          Bundle savedInstanceState) {
      if (rootView != null) {
          Log.d("map","rootView != null");
          ViewGroup parent = (ViewGroup) rootView.getParent();
          if (parent != null)
              Log.d("map","parent != null");
              parent.removeView(rootView);
      }
      try {
          Log.d("map","inside try");
          rootView = inflater
                  .inflate(R.layout.fragment_map, container, false);
          setupGmap();
      } catch (InflateException e) {
          Log.d("map","inside catch");
      }
      return rootView;
  }
  </code></pre>
  
  <p>In XML:</p>
  
  <pre><code>    &lt;fragment
      android:id="@+id/map"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      class="com.google.android.gms.maps.SupportMapFragment"
      android:name="pl.szymonmaslanka.qrapp.MapFragment" /&gt;
  </code></pre>
  
  <p>To add more clearness what happens:
  Open app, click map in menu - map shows up correctly -> move to another menu item -> click again map menu - white screen istead of map -> rotate phone - map magically appears.</p>
  
  <p>Cheers</p>