Explictly add Yes/No commands to "Open xxx" dialog to ensure that both options show...
authorsrowen <srowen@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Tue, 22 Jan 2008 23:38:25 +0000 (23:38 +0000)
committersrowen <srowen@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Tue, 22 Jan 2008 23:38:25 +0000 (23:38 +0000)
git-svn-id: http://zxing.googlecode.com/svn/trunk@154 59b500cc-1b3d-0410-9834-0bbf25fbcc57

javame/src/com/google/zxing/client/j2me/ZXingMIDlet.java

index a3bfc24..299bc61 100644 (file)
@@ -114,8 +114,10 @@ public final class ZXingMIDlet extends MIDlet {
   private void showOpenURL(String title, final String display, final String uri) {
     Alert alert = new Alert(title, display, null, AlertType.CONFIRMATION);
     alert.setTimeout(Alert.FOREVER);
-    final Command cancel = new Command("Cancel", Command.CANCEL, 1);
-    alert.addCommand(cancel);
+         Command yes = new Command("Yes", Command.OK, 1);
+    alert.addCommand(yes);
+    Command no = new Command("No", Command.CANCEL, 1);
+    alert.addCommand(no);
     CommandListener listener = new CommandListener() {
       public void commandAction(Command command, Displayable displayable) {
         if (command.getCommandType() == Command.OK) {