title: Android: How to implement viewpager and views in single xml file
body: <p>UPDATED : Can I use the following layout to implement 3 textviews in Viewpager :</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:orientation="vertical"&gt;
  
      &lt;android.support.v4.view.ViewPager
      android:id="@+id/pager"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
         &lt;TextView
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:text="view 1"/&gt;
         &lt;TextView
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:text="view 2"/&gt;
         &lt;TextView
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:text="view 3"/&gt;
  
      &lt;/android.support.v4.view.ViewPager&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>I want to implement the ViewPager for these 3 views. and i want to have viewpager and those 3 views in single xml file. Each page contains each textview. I have seen some examples but each page was implement using separate xml layout file.</p>
  
  <p>How can I implement the viewpager for these 3 views in a single xml file. If possible please provide me a sample code or example.</p>