title: How to show and hide actionbar for fragments using viewpager
body: <p>I have fragment A, B, C, D inside a viewpager.
  I want to hide the actionbar in fragment A and show the actionbar for the rest of the fragments.</p>
  
  <p>Any Ideas?
  Thanks.</p>
  
  <p>Edit:
  Tried the following and still had the actionbar show up in all the fragments.</p>
  
  <pre><code>@Override 
  public void onPageSelected(int position) {
  if (position == 0) {
    mActionBar.hide();
  } else {
    mActionBar.show();
  }
  }
  </code></pre>
  
  <p>Pretty much when you open the activity with the viewpager I am want Fragment A to show up with no actionbar but when i swipe to view the other fragments I want the actionbar to be shown.</p>