dialog.setBackCommand(new Command("") { @Override public void actionPerformed(ActionEvent evt) { dialog.dispose(); } });
The workaround for me is to use showPopupDialog, which can be disposed with back button. I styled it to avoid the default popup design.
On Thursday, June 2, 2016 at 7:56:26 AM UTC+2, Miguel Munoz wrote:
I created a dialog using one of the Dialog.show() methods, and I discovered that my Android's back button doesn't dismiss the dialog. This breaks the convention of the back button, which should always dismiss a dialog. Your API doesn't even specify what the return value should be when the back button is pressed. Was this an oversight? Or is this by design? Is there a way to get the back buttonThis to work?
The Dialog in Codename One is a separate Form so the back arrow has nothing to do with it.