title: Check is user is try to swipe out of last page of ViewPager and then start a new and kill the current activity
body: <p>I have an <code>Activity</code> which extends <code>FragmentActivity</code></p>
  
  <pre><code>public class SlideScreen extends FragmentActivity {
  
  
      SectionsPagerAdapter mSectionsPagerAdapter;
  
  
      ViewPager mViewPager;
   protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_slide_screen);
  
  
          mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());
  
  
          mViewPager = (ViewPager) findViewById(R.id.pager);
          mViewPager.setAdapter(mSectionsPagerAdapter);
  
  
  
          OnPageChangeListener mListener = new OnPageChangeListener() {
  
              @Override
              public void onPageSelected(int arg0) {
  
                  Log.i("Doing something here", "onPageSelected : "+arg0);
              }
  
              @Override
              public void onPageScrolled(int arg0, float arg1, int arg2) {
  
  
                  Log.i("My App Logs", "onPageScrolled : "+arg0+"  "+arg1+" "+arg2);
              }
  
              @Override
              public void onPageScrollStateChanged(int arg0) {
                  Log.i("My App Logs", "onPageScrollStateChanged : "+arg0);
              }
          };
          mViewPager.setOnPageChangeListener(mListener);
  
      }
  ...
  
  ...
  }
  </code></pre>
  
  <p>I want to know when the user try to swipe out of the last page(Total 5 pages) , I cannot apply <code>OnSwipeOutListener</code>.</p>
  
  <p>The <code>OnPageChangeListener</code> is not helping me as its gives <code>onPageSelected</code> as <code>4</code> when swiping from <code>4th</code> to <code>5th</code> and <code>4</code> when swiping out as well</p>
  
  <p>I want to start a new <code>Activity</code> on the swiping at last page.</p>