title: add viewpager to tabs
body: <p>I have the code here with tabs and It works when you select each tab but I cannot swipe to go to next tab.<br>
  Each tab has listview which has its own activity.Only thing I want is to add swipe gesture to go to next tab.How do I do that? I really appreciate any help.Thanks in Advance.</p>
  
  <pre><code>public class AndroidTabAndListView extends TabActivity {
      // TabSpec Names
      private static final String INBOX_SPEC = "Inbox";
      private static final String OUTBOX_SPEC = "Outbox";
      private static final String PROFILE_SPEC = "Profile";
  
      ViewPager pager;
  
  
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
  
  
             pager = (ViewPager) findViewById(R.id.pager);
  
          TabHost tabHost = getTabHost();
  
          // Inbox Tab
          TabSpec inboxSpec = tabHost.newTabSpec(INBOX_SPEC);
          // Tab Icon
          inboxSpec.setIndicator(INBOX_SPEC, getResources().getDrawable(R.drawable.icon_inbox));
          Intent inboxIntent = new Intent(this, InboxActivity.class);
          // Tab Content
          inboxSpec.setContent(inboxIntent);
  
          // Outbox Tab
          TabSpec outboxSpec = tabHost.newTabSpec(OUTBOX_SPEC);
          outboxSpec.setIndicator(OUTBOX_SPEC, getResources().getDrawable(R.drawable.icon_outbox));
          Intent outboxIntent = new Intent(this, OutboxActivity.class);
          outboxSpec.setContent(outboxIntent);
  
          // Profile Tab
          TabSpec profileSpec = tabHost.newTabSpec(PROFILE_SPEC);
          profileSpec.setIndicator(PROFILE_SPEC, getResources().getDrawable(R.drawable.icon_profile));
          Intent profileIntent = new Intent(this, ProfileActivity.class);
          profileSpec.setContent(profileIntent);
  
          // Adding all TabSpec to TabHost
          tabHost.addTab(inboxSpec); // Adding Inbox tab
          tabHost.addTab(outboxSpec); // Adding Outbox tab
          tabHost.addTab(profileSpec); // Adding Profile tab
      }
  }
  </code></pre>
  
  <p>xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;TabHost xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@android:id/tabhost"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"&gt;
  
      &lt;LinearLayout
          android:layout_width="fill_parent"
          android:layout_height="409dp"
          android:orientation="vertical" &gt;
  
          &lt;TabWidget
              android:id="@android:id/tabs"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content" /&gt;
          &lt;FrameLayout
              android:id="@android:id/tabcontent"
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"&gt;
              &lt;android.support.v4.view.ViewPager
          android:id="@+id/pager"
          android:layout_width="match_parent"
          android:layout_height="match_parent" /&gt;
              &lt;/FrameLayout&gt;
  
  
  
      &lt;/LinearLayout&gt;
  &lt;/TabHost&gt;
  </code></pre>