title: Android SimpleOnPageChangeListener - Determine swipe direction
body: <p>I have a class that extends SimpleOnPageChangeListener and in my onPageScrollStateChanged method I want to be able to determine whether the user has swiped forwards or backwards through the ViewPager. I.e. Whether they have swiped left-to-right or right-to-left.</p>
  
  <p>I've done a lot of googling on this but I can't find anything about it. I was expecting the onPageScrollStateChanged method would provide a parameter stating which direction the swipe was but it doesn't.</p>
  
  <pre><code>    @Override
      public void onPageScrollStateChanged(int state) {
  
          // Determine whether the user is swiping forwards or backwards through the ViewPager
      }
  </code></pre>
  
  <p>Does anyone have any ideas?</p>
  
  <p>Cheers
  Mike</p>