{ "id": "160940", "key": "TIMOB-23486", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": [ { "id": "16980", "description": "New V8", "name": "Release 6.0.0", "archived": false, "released": true, "releaseDate": "2016-11-15" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-06-14T20:51:52.000+0000", "created": "2016-06-09T09:17:54.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "AlertDalog" ], "versions": [], "issuelinks": [], "assignee": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "updated": "2016-08-12T01:00:40.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": "*Overview:*\r\n\r\nIn android, when I click outside the AlertDialog, AlertDialog box will close. I need to close AlertDialog only when I click on cancel button in AlertDialog.\r\n[https://developer.android.com/reference/android/app/Dialog.html#setCanceledOnTouchOutside(boolean)]\r\n\r\nh6.steps to reproduce\r\n1. Just create a sample project\r\n2. Paste the following code\r\n3. Run it on device and click the button \r\n4. Then touch outside the dialog \r\n5. It dismisses, the customer wants to prevent that \r\n\r\nh6.Test Code\r\n{code:title=app.js}\r\nvar win = Ti.UI.createWindow({\r\n\r\n});\r\n\r\nvar alertDialog = Ti.UI.createButton({\r\n\ttitle : 'ShowDialog',\r\n\theight : Ti.UI.SIZE,\r\n\twidth : Ti.UI.SIZE,\r\n\r\n});\r\n\r\n// Listen for click events.\r\nalertDialog.addEventListener('click', function() {\r\n\tvar dialog = Ti.UI.createAlertDialog({\r\n\t\tmessage : 'The file has been deleted',\r\n\t\tcancel : 1,\r\n\t\tbuttonNames : ['Confirm', 'Cancel'],\r\n\t\tmessage : 'Would you like to delete the file?',\r\n\t\ttitle : 'Delete'\r\n\r\n\t});\r\n\tdialog.show();\r\n});\r\n\r\n// Add to the parent view.\r\nwin.add(alertDialog);\r\n\r\nwin.open();\r\n\r\n{code}\r\n\r\nThanks", "attachment": [], "flagged": false, "summary": "Android: Add an option to handle AlertDialog box outside touch.", "creator": { "name": "jnaher", "key": "jnaher", "displayName": "Jebun Naher", "active": false, "timeZone": "Asia/Dhaka" }, "subtasks": [], "reporter": { "name": "jnaher", "key": "jnaher", "displayName": "Jebun Naher", "active": false, "timeZone": "Asia/Dhaka" }, "environment": null, "closedSprints": [ { "id": 641, "state": "closed", "name": "2016 Sprint 12 SDK", "startDate": "2016-06-04T00:30:28.612Z", "endDate": "2016-06-18T00:30:00.000Z", "completeDate": "2016-06-20T04:25:16.065Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "388002", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "not sure if this is native behavior. [~msamah]?", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-06-10T01:10:31.000+0000", "updated": "2016-06-10T01:10:31.000+0000" }, { "id": "388005", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "[~cng] This is an improvement ticket that requests for a property to be exposed to allow for that behaviour.\r\nIt's something that should be doable.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-06-10T01:58:55.000+0000", "updated": "2016-06-10T01:58:55.000+0000" }, { "id": "388006", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "[~jnaher] Just to make this ticket complete, could you have a sample code for the AlertDialog included in this ticket?", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-06-10T02:00:05.000+0000", "updated": "2016-06-10T02:00:05.000+0000" }, { "id": "388169", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "Master PR: https://github.com/appcelerator/titanium_mobile/pull/8053", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-06-13T03:51:33.000+0000", "updated": "2016-06-13T03:51:33.000+0000" }, { "id": "392974", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the implementation.\r\n\r\nThe {{canceledOnTouchOutside}} property works as expected.\r\nClosing.\r\n\r\nEnvironment:\r\nAppc Studio : 4.7.0.201607250649\r\nTi SDK : 6.0.0.v20160810073036\r\nTi CLI : 5.0.9\r\nAlloy : 1.9.1\r\nMAC El Capitan : 10.11.6\r\nAppc NPM : 4.2.7\r\nAppc CLI : 6.0.0-24\r\nNode: 4.4.4\r\nNexus 5 - Android 6.0.1", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-08-12T01:00:33.000+0000", "updated": "2016-08-12T01:00:33.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }