title: OnMapReadyCallback not triggered when using Fragment
body: <p>The <strong>onMapReady</strong> function is never called. It needs to be triggered for proper initializating of my GoogleMap.</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main_activity);
    }
  }
  </code></pre>
  
  <p>Should I inherit <strong>MapFragment</strong> instead of <strong>Fragment</strong>? Because I get another Error when I do: it returns a NullPointerException in <strong>MainActivity</strong></p>
  
  <pre><code>import android.os.Bundle;
  import android.support.v4.app.Fragment;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  
  import com.google.android.gms.maps.GoogleMap;
  import com.google.android.gms.maps.OnMapReadyCallback;
  
  public class MapsFragment extends Fragment implements OnMapReadyCallback {
  
      private GoogleMap mMap;
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
                           Bundle savedInstanceState) {
          return inflater.inflate(R.layout.activity_maps, container, false);
      }
  
      @Override
      public void onMapReady(GoogleMap googleMap) {
          mMap = googleMap;
      }
  }
  </code></pre>
  
  <p><strong>main_activity.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"
      android:orientation="vertical" android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
      &lt;fragment android:name=".fragment.MapsFragment"
          android:id="@+id/maps_fragment"
          android:layout_width="match_parent"
          android:layout_height="match_parent"&gt;
      &lt;/fragment&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p><strong>activity_maps.xml</strong></p>
  
  <pre><code>&lt;fragment xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
  
      android:id="@+id/map"
      android:name="com.google.android.gms.maps.SupportMapFragment"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context=".fragment.MapsFragment" /&gt;
  </code></pre>
  
  <p>Many thanks guys!</p>
  
  <p><strong>Update 1:</strong>
  Added this to <strong>MapsActivity</strong>, but now <strong>MainActivity</strong> returns android.view.InflateException: Binary XML file line #6: Error inflating class fragment</p>
  
  <pre><code>@Override
  public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
      super.onViewCreated(view, savedInstanceState);
  
      SupportMapFragment supportMapFragment = (SupportMapFragment) getChildFragmentManager().findFragmentById(R.id.map);
      supportMapFragment.getMapAsync(this);
  }
  </code></pre>