{ "id": "171949", "key": "TIMOB-26224", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2019-04-24T22:30:15.000+0000", "created": "2018-07-21T03:50:23.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "OptionDialog", "android" ], "versions": [], "issuelinks": [ { "id": "57127", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "172905", "key": "TIMOB-26793", "fields": { "summary": "Android: Hide radio buttons OptionDialog", "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" } }, "priority": { "name": "None", "id": "6" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "56742", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "62425", "key": "TIMOB-1793", "fields": { "summary": "Android: Allow OptionDialog to not Have Radiobuttons", "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" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2019-04-24T22:30:15.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": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "*Summary:*\r\nThe {{Ti.UI.OptionDialog}} currently displays a vertical list of radio buttons, but none of the radio buttons are ever enabled if property {{selectedIndex}} is not set. This is not a good interface. Especially if the {{buttonNames}} property is not set as well.\r\n\r\nIt would be better to display a vertical list of normal button like how it works on iOS.\r\n\r\n{code:javascript}\r\nvar window = Ti.UI.createWindow();\r\nvar button = Ti.UI.createButton({ title: \"Show Dialog\" });\r\nbutton.addEventListener(\"click\", function(e) {\r\n\tvar dialog = Ti.UI.createOptionDialog({\r\n\t\ttitle: \"Option Dialog\",\r\n\t\toptions: [\"Option 1\", \"Option 2\", \"Cancel\"],\r\n\t\tcancel: 2,\r\n\t});\r\n\tdialog.addEventListener(\"click\", function(e) {\r\n\t\tTi.API.info(\"@@@ Dialog 'click' index: \" + e.index + \", button: \" + e.button + \", cancel: \" + e.cancel);\r\n\t});\r\n\tdialog.show();\r\n});\r\nwindow.add(button);\r\nwindow.open();\r\n{code}\r\n\r\nWe should only use radio buttons if the {{buttonNames}} property is also set. In which case, tapping a radio button should not automatically close the dialog. Doing it this way, we'll be following Google's material design guideline here...\r\nhttps://material.io/design/components/dialogs.html#usage\r\n", "attachment": [ { "id": "65372", "filename": "OptionDialog.png", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-07-21T03:50:03.000+0000", "size": 38674, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: Modify \"OptionDialog\" to display a list of normal buttons", "creator": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [], "maxResults": 0, "total": 0, "startAt": 0 } } }