This also works, so no need for popup dialogs

        dialog.setBackCommand(new Command("") {
            @Override
            public void actionPerformed(ActionEvent evt) {
                dialog.dispose();
            }            
        });        




On Thursday, June 2, 2016 at 12:40:04 PM UTC+2, Carlos Verdier wrote:
>
> 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 method was Dialog.show(String title, String text, Command[] cmds, int 
>> type, Image icon, long timeout).
>>
>> I built this on Mac OSX 10.11.5, and saw it on the Simulator and an 
>> Android Moto E (2nd Generation) running Android 5.1.
>>
>

-- 
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].
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/4bc60bb0-1fe4-4b6f-86cb-ec695121dd30%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to