title: Adding a listview as on of the views that can be selected in a navigation drawer
body: <p>First off; I would like to apologize for the lengthy question. I though this was the only way to get across what I am trying to do. Anyway. I have an app that user a navigation drawer that will offer a user 3 choices. I want Test1Fragment to be a listview. I can not seem to figure out how to make this happen. Please help.</p>
  
  <p>MainActivity method that controls which fragment is loaded based on the selection:</p>
  
  <pre><code>    private void selectItem(int position) {
      // update the main content by replacing fragments
  
      Fragment fragment = null;
  
      switch (position) {
          case 0:
              fragment = new Test1Fragment();
              break;
          case 1:
              fragment = new Test2Fragment();
              break;
          case 2:
              fragment = new Test3Fragment();
              break;
          default:
              break;
      }
  
      if (fragment != null) {
          FragmentManager fragmentManager = getFragmentManager();
          fragmentManager.beginTransaction().replace(R.id.content_frame, fragment).commit();
  
          // update selected item and title, then close the drawer
          mDrawerList.setItemChecked(position, true);
          mDrawerList.setSelection(position);
          setTitle(mNavigationDrawerItemTitles[position]);
          mDrawerLayout.closeDrawer(mDrawerList);
  
      } else {
          // error in creating fragment
          Log.e("MainActivity", "Error in creating fragment");
      }
  }
  </code></pre>
  
  <p>Test1Fragment:</p>
  
  <pre><code>public class Test1Fragment extends Fragment {
  
  
  public Test1Fragment() {
  }
  
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
  
      View rootView = inflater.inflate(R.layout.fragment_create, container, false);
  
      return rootView;
  }
  </code></pre>
  
  <p>fragment_create.xml:</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent" &gt;
  
  &lt;!--&lt;TextView--&gt;
      &lt;!--android:id="@+id/txtLabel"--&gt;
      &lt;!--android:layout_width="wrap_content"--&gt;
      &lt;!--android:layout_height="wrap_content"--&gt;
      &lt;!--android:layout_centerInParent="true"--&gt;
      &lt;!--android:text="Create View"--&gt;
      &lt;!--android:textSize="16dp" /&gt;--&gt;
  
  &lt;!--&lt;ImageView--&gt;
      &lt;!--android:layout_width="wrap_content"--&gt;
      &lt;!--android:layout_height="wrap_content"--&gt;
      &lt;!--android:layout_below="@id/txtLabel"--&gt;
      &lt;!--android:layout_centerHorizontal="true"--&gt;
      &lt;!--android:layout_marginTop="10dp"--&gt;
      &lt;!--android:src="@drawable/ic_action_copy" /&gt;--&gt;
  
      &lt;ListView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:id="@+id/listView"
          android:layout_centerVertical="true"
          android:layout_centerHorizontal="true" /&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>I understand that I am missing code for the listview, but this is all I want int the xml view.</p>
  
  <p>Thank you</p>