Adding menu entries to Blackberry menu list
Blackberry applications have开发者_运维百科 a "menu" list coming up when you hit the Blackberry menu button. (When you inherit from "MainScreen
".) But in my application there is only one entry, "Close".
How do I add entries to this menu?
(This is not a dupe of this question, which is about replacing the standard menu with an entirely custom menu.)
create a menu item using the net.rim.device.api.ui.MenuItem. You can add it to a MainScreen with the addMenuItem(MenuItem item) function.
EDIT
sample code
MenuItem mi=new MenuItem("mymenuitem",1,1);
addMenuItem(mi);
精彩评论