Bug 5436 - A Checkable Menu appears in the wrong location
Summary: A Checkable Menu appears in the wrong location
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 4.2.x
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2012-05-31 09:15 UTC by jonathan_chapman
Modified: 2012-09-20 06:03 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Checkable Menu (1.35 KB, text/xml)
2012-05-31 09:15 UTC, jonathan_chapman
sshot that seems to show it's working. (67.99 KB, image/png)
2012-07-05 04:57 UTC, Atsushi Eno

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:

Description jonathan_chapman 2012-05-31 09:15:37 UTC
Created attachment 1992 [details]
Checkable Menu

When I have a menu that has an item that appears on the actionbar and that item then opens a submenu that has checkable items the submenu always appears in the top left-hand corner.  If the screen is then rotated the submenu goes to the proper location.  

This has been tried on handhelds (HTC, Samsung), tablets (Assus, Acer), and the emulator with an initial orientation of portrait and landscape.  The OS on all these devices is the latest ice cream sandwich.

We have never had a problem with menus that are not checkable.

I've attached an example of the menu that does not work.

Comment 1 Atsushi Eno 2012-07-05 04:57:44 UTC
Created attachment 2153 [details]
sshot that seems to show it's working.

I couldn't reproduce this issue on API Level 15 x86 emulator with SDK r20. I attached a sshow.
Since the screen pixels (432) are too few to show all the items on the action bar, I shrunk the Resources/menu/menu.xml, and eliminated string/image resources as I don't have them, which is now:

<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
  <item android:id="@+id/search"
        android:showAsAction="ifRoom" />
  <item android:id="@+id/add"
        android:showAsAction="ifRoom" />
  <item android:id="@+id/ordering"
    <menu android:id="@+id/orderingMenu">
      <item android:id="@+id/ascendingOrdering"
            android:checkable="true" />
      <item android:id="@+id/orderingMenuStartedDate"
            android:checkable="true" />
      <item android:id="@+id/orderingMenuWorkOrderId"
            android:checkable="true" />
      <item android:id="@+id/orderingMenuLocation"
          android:checkable="true" />
      <item android:id="@+id/orderingMenuStatus"
          android:checkable="true" />

For others who want to examine this issue, here is what I added to the default application template code:

		public override bool OnCreateOptionsMenu (IMenu menu)
			MenuInflater inflater = MenuInflater;
			inflater.Inflate (Resource.Menu.test, menu);
			return true;
Comment 2 Atsushi Eno 2012-09-20 06:03:27 UTC
Closing the bug. If it still reproduce please reopen.