title: Fragment added from xml cannot be found in Backstack
body: <p>I am adding a fragment in the xml file, but I was unable to find the instance of the fragment in the backstack.</p>
  
  <p>Below is my xml code</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/fragOneContainer"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent" &gt;
  
      &lt;fragment class="com.myproject.fragments.fragmentname"
          android:id="@+id/frag"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:tag="inspectionSearch"&gt;
  
      &lt;/fragment&gt;
  &lt;/FrameLayout&gt;
  </code></pre>
  
  <p>Below is the code I used to get the list of the fragments</p>
  
  <pre><code>FragmentManager fragmentManager = getFragmentManager();
  List&lt;Fragment&gt; fragmentList = fragmentManager.getFragments();
          for(int i=0;i&lt;fragmentList.size();i++){
              Log.d(TAG,"Fragment at "+i+" = "+fragmentList.get(i).getClass().getName());
          }
  </code></pre>
  
  <p>Note: The fragments I added dynamically in fragOneContainer was appearing in the backstack.</p>
  
  <p>How do I get the instance of the fragment I added in the xml?</p>