title: Android: How to recreate Action bar when fragment changed
body: <p>I have an activity showing a few fragments.
  Activity view contains only ViewPager initialized with custom FragmentPagerAdapter.
  This adapter provide navigation among 3 fragments.</p>
  
  <p>All seems to work fine except Action bar.</p>
  
  <p>I override onCreateOptionsMenu() method in my fragments to create individual Action bar for any fragment:
  <pre>
      @Override
      public void onCreateOptionsMenu(Menu menu, MenuInflater inflater)
      {
          super.onCreateOptionsMenu(menu, inflater);
          menu.clear();</p>
  
  <code>        //fragment specific menu creation
      }
  </code></pre>
  
  <p>
  When I do swipe, new fragment appears, but Action bar stay the same for a few seconds. Probably after a few seconds this method are called and Action bar get changed.</p>
  
  <p>This looks pretty bad when action bar are changed in a while after swipe is finished.
  How can I recreate action bar immediately, before swipe begin?   </p>