BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 09-19-2009, 02:38 PM   #1 (permalink)
New Member
 
Join Date: Jul 2009
Model: 8800
PIN: N/A
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.
Offline  
Old 09-19-2009, 04:19 PM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

From the Javadocs:

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

Parameters:
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.
Offline  
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

(1PCS) X5043S8IZ IC CPU SUPERV 4K EEPROM 8-SOIC 5043 X5043
$7.0
(1PCS) X5043S8IZ IC CPU SUPERV 4K EEPROM 8-SOIC 5043 X5043 picture(1PCS) X5043S8IZ-2.7 IC CPU SUPERV 4K EEPROM 8-SOIC 5043 X5043
$7.0
(1PCS) X5043S8IZ-2.7 IC CPU SUPERV 4K EEPROM 8-SOIC 5043 X5043 picture2 PCS CAT1161WI-28-GT3 SOP-8 CAT1161 SMD-8 I2C Serial CMOS EEPROM
$4.99
2 PCS CAT1161WI-28-GT3 SOP-8 CAT1161  SMD-8 I2C Serial CMOS EEPROM pictureGPS Module Onboard Antenna Flight Control APM2.5 EEPROM MWC for Arduino
$19.93
GPS Module Onboard Antenna Flight Control  APM2.5 EEPROM MWC for Arduino picture5Pcs At24c32 At24c32a 2-Wire Serial Eeprom Memory Dip Ic New R
$0.99
5Pcs At24c32 At24c32a 2-Wire Serial Eeprom Memory Dip Ic New R picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.