title: SupportMapFragment nested in another fragment
body: <p>i'm implementing and Android app where i'm trying to use a SupportMapFragment inside another fragment.
  The map fragment works fine, i can see the map and i get no errors.
  But, in the main activity, i'm trying to get the GoogleMap object from the nested fragment, but all i get is null. Any idea how could i overcome this?</p>
  
  <p><strong>main_activity.xml</strong></p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.v4.view.ViewPager xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:id="@+id/pager"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context=".MainActivity" /&gt;
  </code></pre>
  
  <p><strong>fragment layout.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:orientation="vertical" 
      android:background="#E8E8E8"&gt;
  
          &lt;fragment
              android:id="@+id/map"
              android:name="com.google.android.gms.maps.SupportMapFragment"
              android:layout_width="match_parent"
              android:layout_height="117dp"
              android:layout_margin="5dp" /&gt;
  &lt;LinearLayout/&gt;
  </code></pre>
  
  <p>in MainActivity.java::onCreate()</p>
  
  <pre><code>// Getting reference to the SupportMapFragment of activity_main.xml
          SupportMapFragment fm = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);
  
          //fm is null here
  </code></pre>