My app features a popup menu (contextual menu) on certain elements.
I create this dialog (just some options are in the code snippet below):
public static String openContextualMenu()
{
Dialog alertDialog = new Dialog();
alertDialog.setLayout(BoxLayout.y());
Button editCommandButton=new Button(new Command(stringEdit));
Button deleteCommandButton=new Button(new Command(stringDelete));
Button exportCommandButton=new Button(new Command(stringExport));
alertDialog.add(editCommandButton).add(deleteCommandButton).add(exportCommandButton);
Command commandResult=alertDialog.showDialog();
String result=commandResult.getCommandName();
return result;
}
I think this is the right way to create a popup menu in Codename, isn't it?
However I would like to handle the case when the user dismiss the dialog
with the back button or tapping outside. Is it possible? This could be
useful also for other dialogs of my app.
--
You received this message because you are subscribed to the Google Groups
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/codenameone-discussions/4455e9ac-2a67-4e40-a412-267da488fcd9n%40googlegroups.com.