0

I have a SherlockFragmentActivity with 4 tabs in it. It holds Fragments and everything works fine except I want to change the context menu when the user goes to a different tab.

My tabs are setup similarly (not exactly) as what is on this page:

http://www.javacodegeeks.com/2013/06/android-action-bar-with-tab.html

If each tab has its own context menu, how would that refresh be triggered from the listener?

KVISH
  • 12,923
  • 17
  • 86
  • 162

1 Answers1

0

I found the answer to this in another post, just searched differently:

Android: How to recreate Action bar when fragment changed

Calling this function from the activity:

invalidateOptionsMenu();
Community
  • 1
  • 1
KVISH
  • 12,923
  • 17
  • 86
  • 162