{ "id": "127034", "key": "TIMOB-16556", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2018-08-21T19:59:03.000+0000", "created": "2014-03-03T15:17:42.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "android" ], "versions": [], "issuelinks": [], "assignee": null, "updated": "2018-08-21T19:59:03.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [], "description": "Buttons added to the ButtonNames array should be displayed in the order, left to right, as their position in the array. In other words, the first button in the array should be shown first on the left.\r\n\r\nThey are shown in opposite order (first is on the right)\r\n\r\n", "attachment": [ { "id": "46284", "filename": "app.zip", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-03-03T15:17:42.000+0000", "size": 5938786, "mimeType": "application/zip" }, { "id": "46285", "filename": "Screen Shot 2014-03-03 at 10.15.11 AM.png", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-03-03T15:17:42.000+0000", "size": 30690, "mimeType": "image/png" } ], "flagged": false, "summary": "AlertDialog: ButtonNames buttons are shown in opposite order of their position in array", "creator": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "environment": "Alloy 1.3.1, TiSDK 3.1.2.GA, Android 4.2.2", "comment": { "comments": [ { "id": "295809", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "This is not an Alloy bug. It happens with Classic code as well. Test case:\n\n{code}\nTi.UI.setBackgroundColor('white');\nvar win = Ti.UI.createWindow({ \n backgroundColor: 'white'\n});\nvar lbl = Ti.UI.createLabel({\n textid: \"msg\",\n top: \"25\"\n});\nwin.add(lbl);\n\nvar dialog = Ti.UI.createAlertDialog({\n buttonNames: ['Confirm', 'Cancel', 'Help'],\n message: 'Would you like to delete the file?',\n title: 'Delete'\n});\n\nwin.addEventListener('open', function() {\n dialog.show();\n\n});\n\nwin.open();\n{code}", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-03-05T21:41:02.000+0000", "updated": "2014-03-05T21:41:02.000+0000" }, { "id": "352026", "author": { "name": "cbowley", "key": "cbowley", "displayName": "Chris Bowley", "active": true, "timeZone": "Europe/London" }, "body": "[~ingo] This has been raised as an issue by ACE. To follow both the iOS and Android design guidelines requires some nasty branching. Can we get this prioritised? ", "updateAuthor": { "name": "cbowley", "key": "cbowley", "displayName": "Chris Bowley", "active": true, "timeZone": "Europe/London" }, "created": "2015-05-08T13:28:44.000+0000", "updated": "2015-05-08T13:28:44.000+0000" }, { "id": "352103", "author": { "name": "shawnlan", "key": "shawnlan", "displayName": "Shawn Lan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is not a bug since before ICS the default order is \"OK/Cancel.\" Starting ICS, the order is changed to \"Cancel/OK.\"\r\n\r\nSo if I have an alertdialog like this:\r\n\r\nvar dialog = Ti.UI.createAlertDialog({\r\n\t\t cancel: 1,\r\n\t\t buttonNames: ['OK', 'Cancel'],\r\n\t\t message: 'message',\r\n\t\t title: 'title'\r\n\t\t});\r\n\r\nIt adapts to platform's default automatically.", "updateAuthor": { "name": "shawnlan", "key": "shawnlan", "displayName": "Shawn Lan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-05-09T01:03:51.000+0000", "updated": "2015-05-11T17:08:25.000+0000" }, { "id": "352145", "author": { "name": "cbowley", "key": "cbowley", "displayName": "Chris Bowley", "active": true, "timeZone": "Europe/London" }, "body": "[~shawnlan] looking at the design guidelines for iOS and Android, for non-destructive alerts (which I think should be the default), the button order should be the same:\r\n\r\nAndroid\r\nhttp://developer.android.com/design/building-blocks/dialogs.html\r\n\"The dismissive action of a dialog is always on the left. Dismissive actions return to the user to the previous state.\r\nThe affirmative actions are on the right. Affirmative actions continue progress toward the user goal that triggered the dialog.\"\r\nOrder: Cancel | OK\r\n\r\niOS\r\nhttps://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/Alerts.html\r\n\"When the most likely button performs a nondestructive action, it should be on the right in a two-button alert. The button that cancels this action should be on the left.\"\r\nOrder: Cancel | OK", "updateAuthor": { "name": "cbowley", "key": "cbowley", "displayName": "Chris Bowley", "active": true, "timeZone": "Europe/London" }, "created": "2015-05-11T10:08:14.000+0000", "updated": "2015-05-11T10:08:14.000+0000" }, { "id": "352166", "author": { "name": "shawnlan", "key": "shawnlan", "displayName": "Shawn Lan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Sorry I'm not talking about iOS vs Android. I'm talking about Android 14+ vs earlier versions.\r\n\r\nCheck this: http://stackoverflow.com/questions/12705058/ok-cancel-buttons-order-in-ics", "updateAuthor": { "name": "shawnlan", "key": "shawnlan", "displayName": "Shawn Lan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-05-11T17:15:24.000+0000", "updated": "2015-05-11T17:15:24.000+0000" }, { "id": "352167", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~shawnlan] FYI, we don't support versions earlier than ICS as of 4.0.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-05-11T17:22:42.000+0000", "updated": "2015-05-11T17:22:42.000+0000" }, { "id": "440961", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is not a bug.\r\n\r\nAndroid 4.0 reversed the button order in dialogs from left-to-right (Windows style) to right-to-left (Apple style). So, if given button array {{[\"OK\", \"Cancel\"]}}, on Android 2.2 it would appear {{[OK][Cancel]}} and on Android 4.0 it would appear {{[Cancel][OK]}}. This is the correct behavior and respects the native UI guidelines of the environment.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-08-21T19:58:55.000+0000", "updated": "2018-08-21T19:58:55.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }