title: How to include FragmentActivity layout in Activity layout?
body: <p>I want to include a <strong>FragmentActivity</strong> layout in another AppCompatActivity layout.</p>
  
  <p>In particular I want to show a Google map (in this case the <strong>FragmentActivity</strong>) inside a container of the other AppCompatActivity .
   i am going to show my code.</p>
  
  <p><strong>1. The AppCompatActivity layout:</strong></p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
      &lt;include
          android:id="@+id/map_toolbar"
          layout="@layout/app_bar" /&gt;
  
      &lt;LinearLayout
          android:id="@+id/map_container"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:orientation="vertical"&gt;
      &lt;/LinearLayout&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p><strong>2.The AppCompatActivity class</strong></p>
  
  <pre><code>public class MapActivity extends AppCompatActivity {
  
      private Toolbar _toolbar;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_map);
          _toolbar = (Toolbar) findViewById(R.id.map_toolbar);
          setSupportActionBar(_toolbar);
      }
  }
  </code></pre>
  
  <p><strong>3.The FragmentActivity layout:</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;fragment xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/map"
      android:name="com.google.android.gms.maps.SupportMapFragment"
      android:layout_width="match_parent"
      android:layout_height="match_parent" /&gt;
  </code></pre>
  
  <p><strong>4.The FragmentActivity class:</strong></p>
  
  <pre><code>public class MapFragmentActivity extends FragmentActivity implements OnMapReadyCallback
  {
  
      private GoogleMap mMap;
  
      @Override
      protected void onCreate(Bundle savedInstanceState)
      {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.fragment_map);
  
          // Obtain the SupportMapFragment and get notified when the map is ready to be used.
          SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
                  .findFragmentById(R.id.map);
          mapFragment.getMapAsync(this);
  
      }
  }
  </code></pre>
  
  <p>When I run this just show the app bar on top and blank frame in the place that I needed to have the map.</p>
  
  <p>Please help. </p>
  
  <p>thanks.</p>