Hi, You can order the items in your Menu by using the group argument of the Menu.add() methods. As stated in documentation: "group Item ordering grouping control. The item will be added after all other items whose order is <= this number, and before any that are larger than it. This can also be used to define groups of items for batch state changes. Normally use 0."
For example: menu.add(1, INSERT_ID, R.string.menu_insert); menu.add(0, DELETE_ID, R.string.menu_delete); Here menu item insert will be added to the position after delete, because its group value is 1. Thanks, Megha On Tue, Apr 8, 2008 at 7:52 AM, Android-Berry <[EMAIL PROTECTED]> wrote: > > Hi Guys, > > Thanks for your help, > > I can create menuitem dynmatically, > > However, I have found another issue, > > For example, when I added a menuitem at first place. > > and since content of screen has been changed, so this menuitem has > been removed. > > but things changed again, I will display this menuitem again, but I > want it show up at the same place > as it first showed instead of being displayed at the last place, which > current I implemented. > > How to set menuitem position, like insert function? > > Thanks > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

