BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 02-05-2010, 02:03 AM   #1 (permalink)
New Member
 
Join Date: Jan 2010
Model: 8520
PIN: N/A
Carrier: airtel-india
Posts: 11
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Create Menu and Add this in Existing BB application??

Please Login to Remove!

hi...i am creating new Menu and trying to Add in Existing BB application...can any one tell me ..how to add menu in Existing BB application???

i wrote code for this but i am not getting exact solution

import net.rim.device.api.ui.MenuItem;
import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.component.RichTextField;
import net.rim.device.api.ui.container.MainScreen;

public class CreateMenu extends UiApplication {

public static void main(String args[]) {
CreateMenu theApp = new CreateMenu();
theApp.enterEventDispatcher();
}
}

class CreateMenuScreen extends MainScreen {
public CreateMenuScreen() {
addMenuItem(viewItem);
}

public MenuItem viewItem = new MenuItem("MyMenu", 100, 100) {

public void run() {

CreateMenuScreen myscreen = new CreateMenuScreen();
setTitle(" Message");
add(new RichTextField("create menu"));
UiApplication.getUiApplication().pushScreen(myscre en);
}

};
}


thanks
Offline  
Old 02-05-2010, 03:44 AM   #2 (permalink)
Knows Where the Search Button Is
 
Join Date: Apr 2009
Model: 8800
PIN: N/A
Carrier: Airtel
Posts: 31
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Use ApplicationMenuItem.
Offline  
Old 02-13-2010, 07:15 PM   #3 (permalink)
New Member
 
Join Date: Feb 2010
Model: 8900
PIN: N/A
Carrier: ATT
Posts: 13
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

ApplicationMenuItem menuItem = new ApplicationMenuItem ....

ApplicationMenuItemRepository.getInstance().addMen uItem( ApplicationMenuItemRepository.MENUITEM_SYSTEM, menuItem);
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

Vintage Brass Printing Galley Tray, American Dec. 6, 1904
$9.99
Vintage Brass Printing Galley Tray, American Dec. 6, 1904 pictureHSS 21PCS VALVE SEAT & FACE CUTTER 45DEC 30DEC 20DEC FOR VINTAGE CAR,BIKES, JEEP
$229.0
HSS 21PCS VALVE SEAT & FACE CUTTER 45DEC 30DEC 20DEC FOR VINTAGE CAR,BIKES, JEEP pictureHSS 12PCS VALVE SEAT & FACE CUTTER 45DEC 30DEC 20DEC FOR VINTAGE CAR, BIKES,JEEP
$165.0
HSS 12PCS VALVE SEAT & FACE CUTTER 45DEC 30DEC 20DEC FOR VINTAGE CAR, BIKES,JEEP pictureHSS 15PCS VALVE SEAT & FACE CUTTER 45DEC 30DEC 20DEC FOR VINTAGE CAR, BIKES,JEEP
$197.0
HSS 15PCS VALVE SEAT & FACE CUTTER 45DEC 30DEC 20DEC FOR VINTAGE CAR, BIKES,JEEP pictureHSS 10PCS VALVE SEAT & FACE CUTTER 45DEC 30DEC 20DEC FOR VINTAGE CAR, BIKES,JEEP
$153.0
HSS 10PCS VALVE SEAT & FACE CUTTER 45DEC 30DEC 20DEC FOR VINTAGE CAR, BIKES,JEEP picture






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