What I need:
Create an options menu with “Sign in” option, when user signs in it needs to change to “Sign Out” when user taps on the menu button again
When using a pure SDK i can just change the menu options in onPrepareOptionsMenu
the same works when using compatibility library v4
however when using ActionBarSherlock the menu won’t update in onPrepareOptionsMenu; it still gets called, but the menu shown does not change.
Does anyone have a solution to this?
Yeah, this is a nasty bug in ABS.
You can fix it like this:
In FragmentActivity.java find onPrepareOptionsMenu(android.view.Menu menu) method and comment out or delete
line and it’s corresponding closing bracket, so this block gets executed every time.
Do the same in the FragmentMapActivity activity, if you are using it.