{ "id": "102272", "key": "TIMOB-11184", "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": [ { "id": "14165", "description": "2012 Sprint 21 API", "name": "2012 Sprint 21 API", "archived": true, "released": true, "releaseDate": "2012-10-22" }, { "id": "14273", "description": "2012 Sprint 21", "name": "2012 Sprint 21", "archived": true, "released": true, "releaseDate": "2012-10-22" } ], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2012-10-10T19:50:14.000+0000", "created": "2012-09-27T00:36:03.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "api", "module_activityindicator", "qe-and100112", "qe-testadded", "regression" ], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [ { "id": "21885", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "102927", "key": "TIMOB-11312", "fields": { "summary": "Android: ActivityIndicator: Activity indicator is not working.", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "21887", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "82502", "key": "TIMOB-6092", "fields": { "summary": "Android: Feature Request Standalone Loading indicator", "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": "High", "id": "2" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "21593", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "91213", "key": "TIMOB-8954", "fields": { "summary": "Android: Cancelable ActivityIndicator", "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": "High", "id": "2" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-03-13T18:55:48.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": [ { "id": "32091", "filename": "device-2012-09-26-171422.png", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-27T00:36:03.000+0000", "size": 35215, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: Cancelable ActivityIndicator", "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": "222952", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The Android ActivityIndicator is totally new in 3.0.0 (see TIMOB-6092). It is a view, so it has to be added to the window/view before the show() method is called. The new ActivityIndicator does not have the property \"cancelable\" any more. Mark the ticket as invalid.", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-10T19:46:49.000+0000", "updated": "2012-10-10T19:48:04.000+0000" }, { "id": "224319", "author": { "name": "tsmolich", "key": "tsmolich", "displayName": "Tamila Smolich", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing the bug as invalid.", "updateAuthor": { "name": "tsmolich", "key": "tsmolich", "displayName": "Tamila Smolich", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-18T21:56:04.000+0000", "updated": "2012-10-18T21:56:04.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }