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

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


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


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:
Status:
RESOLVED FIXED

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.

Regards,
Jonathan
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:title="S"
        android:showAsAction="ifRoom" />
        <!--
  <item android:id="@+id/add"
        android:title="C"
        android:showAsAction="ifRoom" />
        -->
  <item android:id="@+id/ordering"
      android:title="O"
      android:showAsAction="ifRoom">
    <menu android:id="@+id/orderingMenu">
      <item android:id="@+id/ascendingOrdering"
            android:title="Ascending"
            android:checkable="true" />
      <item android:id="@+id/orderingMenuStartedDate"
            android:title="StartedDate"
            android:checkable="true" />
      <item android:id="@+id/orderingMenuWorkOrderId"
            android:title="WorkOrderId"
            android:checkable="true" />
      <item android:id="@+id/orderingMenuLocation"
          android:title="Location"
          android:checkable="true" />
      <item android:id="@+id/orderingMenuStatus"
          android:title="StatusLabel"
          android:checkable="true" />
    </menu>
  </item>
</menu>

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.