{ "id": "102276", "key": "TIMOB-11186", "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": "2012-09-27T00:44:15.000+0000", "created": "2012-09-27T00:38:18.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "qe-and090112" ], "versions": [], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-06-19T12:43:34.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": "Description:\r\nFeature\r\nAllow ActivityIndicator dialogs on Android to be cancelable by the user.\r\nNote: this is an Android only feature and doesn't require parity with iOS and MobileWeb\r\nsince they don't use modal dialogs.\r\nAPI Changes\r\nNew property: cancelable\r\nWhen true the indicator can be canceled by the user.\r\nNew event: cancel\r\nFired when the user has canceled the indicator. This is called after the indicator\r\ndialog has been hidden, so the developer does not need to call hide() manually.\r\n* IT IS A REGRESSION* it is not occurs on 2.1.3.v20120926141610\r\nTest case:\r\n{code}\r\n\r\nvar hideIndicatorTimeout = null;\r\n \r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: \"red\",\r\n layout: 'vertical'\r\n});\r\n \r\nvar indicator = Ti.UI.createActivityIndicator({\r\n message: \"Processing...\",\r\n cancelable: true // Indicator will be cancelable by setting this to true.\r\n});\r\nindicator.addEventListener('cancel', function() {\r\n // Fired when the user has canceled this indicator.\r\n clearTimeout(hideIndicatorTimeout);\r\n alert(\"Aborted processing\");\r\n});\r\n \r\nvar cancelableSwitch = Titanium.UI.createSwitch({\r\n title: 'Cancelable',\r\n style: Ti.UI.Android.SWITCH_STYLE_CHECKBOX,\r\n value: true\r\n});\r\ncancelableSwitch.addEventListener('change',function(e)\r\n{\r\n indicator.cancelable = e.value;\r\n});\r\nwin.add(cancelableSwitch);\r\n \r\nvar showIndicatorButton = Ti.UI.createButton({\r\n title: \"Show Indicator\"\r\n});\r\nshowIndicatorButton.addEventListener('click', function() {\r\n indicator.show();\r\n hideIndicatorTimeout = setTimeout(function() {\r\n indicator.hide();\r\n }, 5000);\r\n});\r\nwin.add(showIndicatorButton);\r\n \r\nwin.open();\r\n{code}\r\n1. Start up the application.\r\n2. Click \"Show Indicator\".\r\n3. Wait for it to go away (~5 seconds).\r\n4. Click \"Show Indicator\" again.\r\n5. Press the BACK button, the dialog should go away. You should also see an alert popup.\r\n6. Uncheck \"Cancelable\" and click \"Show Indicator\" again.\r\n7. Try hitting the BACK button, nothing should happen. Dialog should disappear in 5 seconds.\r\n8. Check \"Cancelable\" and click \"Show Indicator\".\r\n9. Try hitting the BACK button, the dialog should go away and alert popup (same as step 5).\r\n", "attachment": [], "flagged": false, "summary": "TIMOB-8954", "creator": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Tested on:\r\nTitanium Studio, build: 2.1.2.201208301612\r\nSDK 3.0.0.v20120926130913\r\nANDROID HTC 4.0.3", "comment": { "comments": [ { "id": "221166", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "this issue is accidentally cloned, closing as invalid ", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-27T00:43:35.000+0000", "updated": "2012-09-27T00:43:35.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }