title: Showing/Hiding menu items in viewPager fragments WITHOUT DELAY (Android)
body: <p>I am aware that similar questions have been posted on this site many times before, HOWEVER, my question is not how I can show/hide menu items in different fragments. I got that down. The problem is there is a delay between swiping fragments and the new menu items showing or hiding. This delay really detracts from the interface. The changes in the action bar menu items should be immediate, amongst other reasons, to avoid clicking certain menu items in the wrong fragment. </p>
  
  <p>So question is, <strong>how can i change the menu items in the actionbar immediately when the user begins swiping the fragment to go to the next?</strong></p>
  
  <p>I know it's possible because various applications already do this. 
  I am currently overriding the onPrepareOptionsMenu() method in every fragment and telling it which items to show and which to hide. I use supportInvalidateOptionsMenu() method to prompt the changing of the menu items, but the lag is still too long and evident.</p>
  
  <p>I am open to changing the structure/technique of my changing of the menu items in the fragment <strong>in order to achieve an IMMEDIATE change in the menu times as soon as the swiping begins.</strong></p>
  
  <p>Please help. Thanks!</p>