This is my code to create the default dialog in Codename one. When the user clicks ok it must proceed/call a function and when they cancel the dialog should just close.
Dialog.show("Confirm", "Do you want to proceed?", "OK", "Cancel");
This is my code to create the default dialog in Codename one. When the user clicks ok it must proceed/call a function and when they cancel the dialog should just close.
Dialog.show("Confirm", "Do you want to proceed?", "OK", "Cancel");
 
    
    The solution is pretty simple:
if (Dialog.show("Confirm", "Do you want to proceed?", "OK", "Cancel")) {
    //Ok action goes here
}
If you want to handle cancel, just add the else part.
