title: ViewPager's onPageSelected never called
body: <p>I need to implement <code>setOnPageChangeListener</code> because i need to hide certain <code>item</code> from <code>ActionBar</code> if the first fragment is showed to the user.</p>
  
  <p>My simple code :</p>
  
  <pre><code>    viewPager.setOnPageChangeListener(new OnPageChangeListener() {
  
          @Override
          public void onPageSelected(int page) { //never called
              // TODO Auto-generated method stub
              if(page == 0)
              {
                  isSearch = false;
              }
              else
              {
                  isSearch = true;
              }
              supportInvalidateOptionsMenu();
          }
  
          @Override
          public void onPageScrolled(int arg0, float arg1, int arg2) {
              // TODO Auto-generated method stub
  
          }
  
          @Override
          public void onPageScrollStateChanged(int arg0) {
              // TODO Auto-generated method stub
  
          }
      });
  viewPager.setCurrentItem(0); //not working
  </code></pre>
  
  <p>If the first fragment is shown (<code>page</code> == 0), <code>isSearch</code> should be <code>false</code> but the <code>onPageSelected</code> never getting called when i debug it.</p>
  
  <p>Please kindly help me, Thanks for your help.</p>
  
  <p>Note : My adapter does <strong>not</strong> implements <code>OnPageChangeListener</code>. Or should i implement it? Is it a must?</p>