title: R.id.pager? Where is this defined?
body: <p>The example for viewpager, <a href="http://developer.android.com/reference/android/support/v4/view/ViewPager.html" rel="nofollow">here</a>, contains the lines:</p>
  
  <pre><code>    mViewPager = new ViewPager(this);
      mViewPager.setId(R.id.pager);
  </code></pre>
  
  <p>I don't understand how R.id.pager is defined. Am I supposed to create a viewpager in xml somewhere? But that wouldn't make sense because it's instantiating a viewpager in the previous line. If someone could clear this up for me I would be most grateful!!</p>
  
  <p>Thank you!!</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Apparently changing the line to:</p>
  
  <pre><code>mViewPager.setId(1);
  </code></pre>
  
  <p>Makes it work :) :)</p>