In the onPrepareOptionsMenu, we call:
menu.removeGroup(Menu.CATEGORY_ALTERNATIVE);

then, we add items to the Menu.CATEGORY_ALTERNATIVE group like this:

    menu.add(Menu.CATEGORY_ALTERNATIVE, 200 + ix, ix, sText);

I track the calls in the debugger and see that the removeGroup is
called.  It then adds the items in a loop based on the selected entry
in the list we are displaying.  The first time the menu is displayed,
it shows up fine.  However, on subsequent calls to
onPrepareOptionsMenu, it continues to add duplicate items in the
menu.add() call even tho we are calling removeGroup.  So, it appears
that removeGroup is not removing the items added into
CATEGORY_ALTERNATIVE group.

Am I missing something, or is this a bug.  I believe this worked fine
in M5 when using SELECTED_ALTERNATIVE as the group ID.

Greg


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to