title: Xamarin Android fragment not showing
body: <p>I'm trying to load a fragment in a frame layout from my main activity.
  In my resources/layout/ i got my layout for the fragment "trackMap"</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:background="@color/accent"&gt;
      &lt;TextView
          android:id="@+id/txtFragment1"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_centerInParent="true"
          android:textColor="#000"
          android:text="TRACK MAP" /&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>and the class for TrackMapFragment:</p>
  
  <pre><code>public class TrackMapFragment : Android.Support.V4.App.Fragment
      {
          public override void OnCreate(Bundle savedInstanceState)
          {
              base.OnCreate(savedInstanceState);
  
              // Create your fragment here
          }
  
          public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
          {
              // Use this to return your custom view for this Fragment
              View view = inflater.Inflate(Resource.Layout.trackMap, container, false);
              return View;
          }
  
          public override void OnActivityCreated(Bundle savedInstanceState)
          {
              Toast.MakeText(this.Activity, "track map fragment created", ToastLength.Short).Show();
              base.OnActivityCreated(savedInstanceState);
          }
      }
  </code></pre>
  
  <p>Then in my main layout i got this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:id="@+id/drawer"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:fitsSystemWindows="true"
      tools:context=".MainActivity"&gt;
    &lt;LinearLayout
        android:layout_height="match_parent"
        android:layout_width="match_parent"
        android:orientation="vertical"&gt;
      &lt;include
        android:id="@+id/toolbar"
        layout="@layout/toolbar"/&gt;
    &lt;FrameLayout
          android:id="@+id/frame"
          android:layout_height="match_parent"
          android:layout_width="match_parent"
          android:background="#336699"/&gt;
    &lt;/LinearLayout&gt;
    &lt;android.support.design.widget.NavigationView
        android:id="@+id/navigation_view"
        android:layout_height="match_parent"
        android:layout_width="260dp"
        android:layout_gravity="start"
        app:headerLayout="@layout/header"
        android:background="?attr/colorAccent"
        app:menu="@menu/drawer" /&gt;
  &lt;/android.support.v4.widget.DrawerLayout&gt;
  </code></pre>
  
  <p>And then from my main activity class (which inherits AppCompatActivity) I try to add it with the fragment manager.</p>
  
  <pre><code>if (_trackMapFragment == null)
  {
      _trackMapFragment = new TrackMapFragment();
      var fragmentTx = SupportFragmentManager.BeginTransaction();
      fragmentTx.Add(Resource.Id.frame, _trackMapFragment);
      fragmentTx.Commit();
  }
  </code></pre>
  
  <p>The toast from the fragment is showing but nothing from the actual fragment, the background doesn't change and the text from the fragment is not showing up.</p>