ActionBarSherlock icon indicating copy to clipboard operation
ActionBarSherlock copied to clipboard

duplicate calls to invalidateOptionsMenu() causes menu items to dissapear

Open emilsjolander opened this issue 13 years ago • 2 comments

Found some issues that sounded similar but not that exactly matched what i'm seeing.

I noticed that when calling invalidateOptionsMenu() and than calling it again shortly (couple of milliseconds) after, some menu items would disappear. The space for the disappearing menu items was still taken into account but they were not rendered and did not respond to touches. This happened on a galaxy tab 10.1 running android 3.2 with the latest stable release of ABS.

(Why i did duplicate calls? well that was a just some old code i had missed to remove)

emilsjolander avatar Apr 18 '12 22:04 emilsjolander

I have 3 fragments (2 SherlockListFragments and 1 SherlockFragment) inside an activity with a FragmentPagerAdapter and if you switch between fragments too quickly the menu items disappear and won't return until onConfigurationChanged() is called. I've tried all kinds of things to get it back. Most notably invalidateOptionsMenu() in many different parts of the code, and none of those calls will recover it.

coryroy avatar May 22 '12 17:05 coryroy

Probably a dupe of #351 and a framework timing issue.

JakeWharton avatar Jun 22 '12 07:06 JakeWharton