title: ViewPager OnPageChangeListener doesn't work
body: <p>I am using a custom ViewPager and ViewPager.OnPageChangeListener doesn't work when I slide to a new page. What might be the reason?</p>
  
  <pre><code>mPager = (WrapContentHeightViewPager) findViewById(R.id.pager);
  
  mPager.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {
      public void onPageScrollStateChanged(int state) {}
      public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {}
  
      public void onPageSelected(int position) {
          // Check if this is the page you want.
          currentFav = position;
          Log.i("currentFav pos", currentFav+"");
      }
  });
  </code></pre>