BlackBerry Forums Support Community               

Closed Thread
LinkBack Thread Tools
Old 09-19-2009, 03:38 PM   #1 (permalink)
New Member
Join Date: Jul 2009
Model: 8800
Carrier: at&t
Posts: 7
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default How to insert menuitem in a specific position?

Please Login to Remove!

I can add the new menuItem in the existing application menu using

ApplicationMenuItemRepository.getInstance().addMen uItem(... as shown in the sample code in other threads.

but how do I add my menuItem in the specific position, or better yet, relative to the existing menuItem. For example, add a new menuItem, "Save", after the existing menuItem, "Open" for example?

Thanks in advance.
Old 09-19-2009, 05:19 PM   #2 (permalink)
BlackBerry Extraordinaire
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts

From the Javadocs:

public ApplicationMenuItem(int order)Creates a new ApplicationMenuItem instance with provided menu position.

order - Display order of this item, lower numbers correspond to higher placement in the menu (relative, an entry of 0 won't necessarily result in the top most item).

You'll need to play around with this ordinal value to determine where the item winds up on the menu.
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Copyright 2004-2014
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.