I have Android code for making a menu. Now I wan开发者_如何学运维t to do the same for BlackBerry.
My Android code overrides Activity.onCreateOptionsMenu and uses a MenuInflater to create the menu items.
The corollary to Activity.onCreateOptionsMenu is Field.makeContextMenu().
There is no direct correlation for the MenuInflater object - you write all of the UI hierarchy directly in Java for BlackBerry apps. So in this case, your makeContextMenu() method will need to create some MenuItem objects, and add them to the returned ContextMenu object.
精彩评论