Dynamic context menus for a BlackBerry CLDC Application
Posted
by Jacob Tabak
on Stack Overflow
See other posts from Stack Overflow
or by Jacob Tabak
Published on 2010-05-16T03:36:28Z
Indexed on
2010/05/16
3:40 UTC
Read the original article
Hit count: 296
In my custom field in a BlackBerry CLDC Application, I want to display a specific context menu based on the current state of the field.
My original idea was to do something like this:
protected void makeContextMenu(ContextMenu contextMenu) {
if (isPaused()) contextMenu.addItem(resumeMenuItem);
else contextMenu.addItem(pauseMenuItem);
}
However, the state of the field doesn't seem to be affecting the items on the context menu. I'm assuming that the context menu only gets "made" once during the life of the field.
Is there a way to do what I'm trying to do?
© Stack Overflow or respective owner