title: Android ViewPager skip page animation
body: <p>I have a ViewPager with multiple Fragments.</p>
  
  <p>I would like to skip some of the pages inside it. I have done the logic for it. It looks like this:</p>
  
  <pre><code>protected List&lt;Fragment&gt; pages;
  
  public void nextSlide()
  {
  
      int currentItem = getPager().getCurrentItem();
      int pagesCount = mPagerAdapter.getCount();
  
  
      while (++currentItem &lt; pagesCount)
      {
          Fragment page = pages.get(currentItem);
          if (page.isEnabled())
          {
              break;
          }
      }
  
      if (currentItem &lt; pagesCount)
      {
          getPager().setCurrentItem(currentItem);
      }
  }
  </code></pre>
  
  <p>But I have problem with animation between 2 pages (with one or more skipped between that). It 'slides' to the proper page, but the animation skips through all 'disabled' pages.</p>
  
  <p>How to handle that, to remove disabled pages from this animation?</p>
  
  <p>Thanks</p>