title: android studio onMapReady not called
body: <p>I want to integrate a map view in one of my views.</p>
  
  <p>I have generated a new map fragment. It comes up in a different view and works like a charm.</p>
  
  <p>I then tried to integrate the code in a normal activity (one with actionbar and so forth). It kinda works - comes up on the screen fine, but onMapReady never gets called in that environment (in other words, I stay stuck in Africa, instead of going to Sydney).</p>
  
  <p>Been on it for hours...</p>
  
  <p>Here is the xml code :</p>
  
  <p>
  </p>
  
  <pre><code>&lt;android.support.design.widget.AppBarLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:theme="@style/AppTheme.AppBarOverlay"&gt;
  
      &lt;android.support.v7.widget.Toolbar
          android:id="@+id/toolbar"
          android:layout_width="match_parent"
          android:layout_height="?attr/actionBarSize"
          android:background="?attr/colorPrimary"
          app:popupTheme="@style/AppTheme.PopupOverlay" /&gt;
  
  &lt;/android.support.design.widget.AppBarLayout&gt;
  
  &lt;fragment xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:map="http://schemas.android.com/apk/res-auto"
      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="com.example.jp.artfoundui.MapsActivity" /&gt;
  
  &lt;android.support.design.widget.FloatingActionButton
      android:id="@+id/monument_capture"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_gravity="bottom|center"
      android:layout_margin="@dimen/fab_margin"
      app:srcCompat="@android:drawable/ic_menu_camera" /&gt;
  </code></pre>
  
  <p></p>
  
  <p>And here is the java code :</p>
  
  <pre><code>public class MonumentActivity extends AppCompatActivity {
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_monument);
      Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
      setSupportActionBar(toolbar);
      getSupportActionBar().setDisplayHomeAsUpEnabled(true);
  
      public class MapsActivity extends FragmentActivity implements OnMapReadyCallback {
  
      private GoogleMap mMap;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_maps);
          // Obtain the SupportMapFragment and get notified when the map is ready to be used.
          SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
                  .findFragmentById(R.id.map);
          mapFragment.getMapAsync(MapsActivity.this);
  
      }
          /**
       * Manipulates the map once available.
       * This callback is triggered when the map is ready to be used.
       * This is where we can add markers or lines, add listeners or move the camera. In this case,
       * we just add a marker near Sydney, Australia.
       * If Google Play services is not installed on the device, the user will be prompted to install
       * it inside the SupportMapFragment. This method will only be triggered once the user has
       * installed Google Play services and returned to the app.
       */
      @Override
      public void onMapReady(GoogleMap googleMap) {
          mMap = googleMap;
  
          // Add a marker in Sydney and move the camera
          LatLng sydney = new LatLng(-34, 151);
          mMap.addMarker(new MarkerOptions().position(sydney).title("Marker in Sydney"));
          mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));
      }
  }
  }
  </code></pre>
  
  <p>Any suggestions ?</p>