title: Cannot set id of a fragment in Android
body: <p>I am having a problem trying to give my Fragments an id within the XML, however I cannot seem to be able to do that.  I tried following tutorials, but the id seems to not be set to the fragment.  I'm using the swipe + sections template that is supplied.  Here is my xml for the main activity:</p>
  
  <pre><code>&lt;android.support.v4.view.ViewPager
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:id="@+id/pager"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context=".MainActivity" &gt;
  
  &lt;!--
  This title strip will display the currently visible page title, as well as the page
  titles for adjacent pages.
  
  --&gt;
  
  &lt;android.support.v4.view.PagerTitleStrip
      android:id="@+id/pager_title_strip"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_gravity="top"
      android:background="#33b5e5"
      android:paddingBottom="4dp"
      android:paddingTop="4dp"
      android:textColor="#fff" /&gt;
  
  &lt;Fragment
      android:id="@+id/account_information_fragment"
      android:name="com.example.AccountInformationFragment"
      android:layout_width="match_parent"
      android:layout_height="match_parent" /&gt;
  
  &lt;/android.support.v4.view.ViewPager&gt;
  </code></pre>
  
  <p>and then in my fragment class I use this to set up the layout:</p>
  
  <pre><code>final View view = inflater.inflate(R.layout.account_information_layout, container, false);
  </code></pre>
  
  <p>And that layout doesn't contain any  tags.  Any help would be much appreciated</p>