title: Issue with ViewPager
body: <p>I'm trying to set up horizontal scrolling tabs, and I've seen people saying use a ViewPager. </p>
  
  <p>Ive got it partly working, I can vertically scroll between my fragments, but I don't get any tabs at the top to select a different tab.</p>
  
  <p>Here's my code</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="match_parent" &gt;
  
  &lt;android.support.v4.view.ViewPager
      android:id="@+id/viewpager"
      android:layout_width="match_parent"
      android:layout_height="wrap_content" /&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>MyPageAdapter pageAdapter;
  Context ctx;
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_home);
      ctx = this;
  
      ActionBar actionBar = getActionBar();
  
      assert actionBar != null;
  
      if (savedInstanceState != null) {
          actionBar.setSelectedNavigationItem(savedInstanceState.getInt("tab", 0));
      }
  
      List&lt;Fragment&gt; fragments = getFragments();
      pageAdapter = new MyPageAdapter(getSupportFragmentManager(), fragments);
      ViewPager pager = (ViewPager)findViewById(R.id.viewpager);
      pager.setAdapter(pageAdapter);
  }
  
  private List&lt;Fragment&gt; getFragments(){
      List&lt;Fragment&gt; fList = new ArrayList&lt;Fragment&gt;();
  
      fList.add(MyFragment.newInstance("MyFragment 1"));
      fList.add(MyFragment.newInstance("MyFragment 2"));
      fList.add(MyFragment.newInstance("MyFragment 3"));
  
      return fList;
  }
  
  
  
  class MyPageAdapter extends FragmentPagerAdapter {
      private List&lt;Fragment&gt; fragments;
  
      public MyPageAdapter(FragmentManager fm, List&lt;Fragment&gt; fragments) {
          super(fm);
          this.fragments = fragments;
      }
      @Override
      public Fragment getItem(int position) {
          return this.fragments.get(position);
      }
  
      @Override
      public int getCount() {
          return this.fragments.size();
      }
  }
  </code></pre>
  
  <p>I'm also including the v4 support library</p>
  
  <pre><code>dependencies {
      compile ('com.android.support:support-v4:13.0.0', 'com.google.android.gms:play-services:3.1.36')
      compile files('/libs/android-async-http-1.4.3.jar')
  }
  </code></pre>
  
  <p>However, in my XML layout I get an warning saying Element android.support.v4.view.ViewPager is not allowed here.</p>
  
  <p>Have I not including the library correctly and is this why I don't see any tabs?</p>