title: Disable swipe in fragmentPagerAdapter? - android
body: <p>I have a fragmentPagerAdapter with 3 fragments in it. How would I disable the swiping between the 3 fragments so the user only uses the tabview to go between fragments?</p>
  <pre><code>private class ViewPagerAdapter extends FragmentPagerAdapter
  {
      ArrayList&lt;Fragment&gt; fragments = new ArrayList&lt;&gt;();
      ArrayList&lt;String&gt; tabTitles = new ArrayList&lt;&gt;();
  
      public ViewPagerAdapter(android.support.v4.app.FragmentManager fragmentManager)
      {
          super(fragmentManager);
      }
      @Override
      public Fragment getItem(int position)
      {
          return fragments.get(position);
      }
      @Override
      public int getCount()
      {
          return fragments.size();
      }
      @Override
      public CharSequence getPageTitle(int position)
      {
          return tabTitles.get(position);
      }
      public void addFragments(Fragment fragment, String titles)
      {
          this.fragments.add(fragment);
          this.tabTitles.add(titles);
      }
  }
  </code></pre>