BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 08-13-2008, 07:56 AM   #1 (permalink)
New Member
 
Join Date: Aug 2008
Model: 8100
PIN: N/A
Carrier: Plus GSM
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default New menu items

Please Login to Remove!

Hi everyone!
I need to create few menu items in standard application menu. Can someone write steps to do that? I've looked for solve, but find anything :(

P.S. Sry for my english.
Offline  
Old 08-13-2008, 08:54 AM   #2 (permalink)
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

overwrite makemenu in the relevant screen. you get a Menu menu where you can add new MenuItems.

example:
Code:
menu.add(new MenuItem("foo", 10, 10) {
	public void run() {
			//do stuff
			}
	});
see slashdev: MenuItem demystified for more information about MenuItems.
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 08-13-2008, 09:40 AM   #3 (permalink)
New Member
 
Join Date: Aug 2008
Model: 8100
PIN: N/A
Carrier: Plus GSM
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Can you write a sample program for me? I'm new in Java for Blackberry
Offline  
Old 08-13-2008, 10:21 AM   #4 (permalink)
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by jaszczompPL View Post
Can you write a sample program for me? I'm new in Java for Blackberry
sure. i can write all kinds of programs, that's what i earn my living with *hint*
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 08-21-2008, 02:11 AM   #5 (permalink)
New Member
 
Join Date: Aug 2008
Model: 8800
PIN: N/A
Carrier: Vodafone
Posts: 2
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

Place the below method in ur class.

public void makeMenu(Menu menu, int instance) {
//add these items to the full menu
if (instance == Menu.INSTANCE_DEFAULT) {
menu.add(new MenuItem("Refresh", 10, 10) {
public void run() {
//do stuff
}
});
menu.add(new MenuItem("View Details", 10, 10) {
public void run() {
//do stuff
}
});
}

//add these items to the both the primary actions menu and the full menu
menu.add(new MenuItem("Refresh", 10, 10) {
public void run() {
//do stuff
}
});
menu.add(new MenuItem("View Details", 10, 10) {
public void run() {
//do stuff
}
});

super.makeMenu(menu, instance);
}
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

EEPROM AT28C256-30PC ATMEL 28-Pin DIP 28C256P LAST ONES
$9.95
EEPROM AT28C256-30PC ATMEL 28-Pin DIP 28C256P LAST ONES pictureHI-LO ALL-100A Programmer FLASH EEPROM MPU +M1-UN-DP48
$1000.0
HI-LO ALL-100A Programmer FLASH EEPROM MPU +M1-UN-DP48 pictureATMEGA168 Microcontroler de 8 bits MCU 16kB Flash 0.5kB EEPROM ATMEGA168-20PU
$3.9
ATMEGA168 Microcontroler de 8 bits MCU 16kB Flash 0.5kB EEPROM ATMEGA168-20PU pictureMicrochip 24LC1025 1024K I2C™ Serial EEPROM
$3.5
Microchip 24LC1025 1024K I2C™ Serial EEPROM pictureStag PP39 MOS Programmer Eprom & EEprom Module 39M101A *Unit Powers On*
$40.5
Stag PP39 MOS Programmer Eprom & EEprom Module 39M101A *Unit Powers On* picture






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