BlackBerry Forums Support Community

BlackBerry Forums Support Community (http://www.blackberryforums.com/)
-   Developer Forum (http://www.blackberryforums.com/developer-forum/)
-   -   Create Menu and Add this in Existing BB application?? (http://www.blackberryforums.com/developer-forum/218849-create-menu-add-existing-bb-application.html)

sam04 02-05-2010 01:03 AM

Create Menu and Add this in Existing BB application??
 
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

pooja.a.maheshwari 02-05-2010 02:44 AM

Use ApplicationMenuItem.

puguasoft 02-13-2010 06:15 PM

ApplicationMenuItem menuItem = new ApplicationMenuItem ....

ApplicationMenuItemRepository.getInstance().addMen uItem( ApplicationMenuItemRepository.MENUITEM_SYSTEM, menuItem);


All times are GMT -5. The time now is 08:18 AM.

Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.