Problem adding application menu item to phone application
Please Login to Remove!
The following code adds Application Menu item to the Calendar app but does not add to Phone app.
public final class DemoApp extends Application
{
public static void main(String[] args){
DemoApp app = new DemoApp();
app.enterEventDispatcher();
}
DemoApp(){
ApplicationMenuItemRepository amir = ApplicationMenuItemRepository.getInstance();
amir.addMenuItem(ApplicationMenuItemRepository.ME NUITEM_PHONE,new SampleMenuItem());
amir.addMenuItem(ApplicationMenuItemRepository.ME NUITEM_CALENDAR,new SampleMenuItem());
}
private static class SampleMenuItem extends ApplicationMenuItem{
SampleMenuItem(){
super(1);
}
public String toString(){
return "Sample Menu";
}
public Object run(Object context){
return context;
}
}
}
If anyone is successful in adding application menus to Phone app, please help.
I am using JDE 4.0 and testing on Blackberry simulator 7320.
Thanks
Sudhakar
|