title: Navigation Drawer in Fragment or Activity?
body: <p>I am trying to add a navigation drawer to an activity which will contain one or two fragments.  I would like this activity to have a navigation drawer associated with it regardless of how many fragments are displayed.  To do this i figured I'd need two xml files, one for the activity and one for the fragment. This seems to work except for the fact that the when the navigation drawer is opened, it is "under" the normal content view.  Am I doing something wrong?  or is there a way to increase the z index of the drawer?</p>
  
  <p>Here is my onCreate() in the activity,</p>
  
  <pre><code>    @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_alarm_list);
      FragmentManager fragmentManager = getFragmentManager();
      FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
      fragmentTransaction.replace(android.R.id.content, new AlarmListFragment());
      fragmentTransaction.commit();
  }
  </code></pre>
  
  <p>and here are my xml layouts:</p>
  
  <p>Activity:</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"
  android:id="@+id/drawer_layout"
  android:layout_width="match_parent"
  android:layout_height="match_parent" &gt;
  
  &lt;LinearLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical" &gt;
  
      &lt;ListView
          android:id="@+id/alarm_list"
          android:layout_width="match_parent"
          android:layout_height="wrap_content" &gt;
      &lt;/ListView&gt;
  &lt;/LinearLayout&gt;
  
  &lt;ListView android:id="@+id/left_drawer"
      android:layout_width="240dp"
      android:layout_height="match_parent"
      android:layout_gravity="start"
      android:choiceMode="singleChoice"
      android:divider="@android:color/transparent"
      android:dividerHeight="0dp"
      android:background="#111"/&gt;
  
    &lt;/android.support.v4.widget.DrawerLayout&gt;
  </code></pre>
  
  <p>Fragment:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:orientation="vertical" &gt;
  
  &lt;ListView
      android:id="@id/android:list"
      android:layout_width="match_parent"
      android:layout_height="wrap_content" &gt;
  &lt;/ListView&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>I'd appricate any suggestions on how to go about this!  Thanks!</p>