Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
It appears that calling InvalidateOptionsMenu(), by the android documentation should result in calling the OnPrepareOptionsMenu() method, but it does not in Mono, it calls the OnCreateOptionsMenu() method instead.
On Android 3.0 and higher, the options menu is considered to always be open when menu items are presented in the action bar. When an event occurs and you want to perform a menu update, you must call invalidateOptionsMenu() to request that the system call onPrepareOptionsMenu()
Update: calling base.OnPrepareOptionsMenu() provides the expected behavior.
Could you please elaborate on the actual code example that shows our InvalidateOptionsMenu() is failing? I found this method used in our HoneycombGallery sample [*1] and verified it works like the original Java sample code. If I understand what you commented, toggling the titles does not result in OnPrepareOptionsMenu(), but it actually did. OnCreateOptionsMenu() is also invoked, but that does not contradict the documentation. It should be fine as long as OnPrepareOptionsMenu() is invoked. This behavior is also identical to the original Java sample.
This bug has been in the NEEDINFO state with no changes for the last 90 days. Can we put this back into the NEW or CONFIRMED state, or are we still awaiting response?
If there is no change in the status of this bug over the next two weeks, this bug will be marked as NORESPONSE.
This bug has not been changed from the NEEDINFO state since my previous comment, marking as RESOLVED NORESPONSE.
Please feel free to REOPEN this bug at any time if you are still experiencing the issue. Please add the requested information and set the bug back to the NEW (or CONFIRMED) state.