Reputation: 854
I am very keen to know what happens when an call to invalidateOptionsMenu()
is made. Does it redraws the whole actionbar or just place a call to onCreateOptionsMenu()
which follows with onPrepareOptionsMenu()
. As per android source code it declare that the options menu has changed, so should be recreated. The onCreateOptionsMenu(android.view.Menu)
method will be called the next time it needs to be displayed. I have certain points that needs clarification:
Upvotes: 1
Views: 3442
Reputation: 2492
It declares that the options menu has changed, so should be recreated. The onCreateOptionsMenu(Menu) method will be called the next time it needs to be displayed.
Does it affects the ActionBar tabs in any way?
It will redraw them.
Does it affects the viewpager inside the layout of activity?
It does not.
Does it impacts the fragments associated with actionbar tabs?
It does not
Upvotes: 4