{ "id": "174496", "key": "TIMOB-27636", "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": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2020-04-07T00:23:21.000+0000", "created": "2019-11-27T13:32:08.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [ "engSchedule" ], "versions": [ { "id": "20884", "name": "Release 8.2.1", "archived": false, "released": true, "releaseDate": "2019-10-25" }, { "id": "20832", "name": "Release 8.3.0", "archived": false, "released": true, "releaseDate": "2019-11-25" } ], "issuelinks": [], "assignee": null, "updated": "2020-04-07T00:23:21.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" }, { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Hello, \r\n\r\nAs we can see the activityIndicator is not working without the SetTime out for Android and iOS. Please have a look at the following code and working environment:\r\n\r\n*Test Environment:*\r\nOperating System\r\nAppcelerator Command-Line Interface, version 7.1.1\r\n Name = Mac OS X\r\n Version = 10.14.6\r\nNode.js\r\n Node.js Version = 8.9.1\r\n npm Version = 5.5.1\r\nTitanium CLI\r\n CLI Version = 5.2.1\r\nTitanium SDK\r\n SDK Version = 8.2.1.GA, 8.3.0.GA\r\n Target Platform = iphone, Android\r\n\r\n*Test Code:*\r\n{code}\r\nTi.UI.backgroundColor = 'white';\r\n\r\nvar win1 = Ti.UI.createWindow({\r\n\tbackgroundColor : 'white'\r\n});\r\n\r\nvar win2 = Ti.UI.createWindow({\r\n\tbackgroundColor : 'yellow'\r\n});\r\n\r\nvar activityIndicator = Ti.UI.createActivityIndicator({\r\n\tcolor : 'green',\r\n\tmessage : 'Loading ...',\r\n\tstyle : Ti.UI.ActivityIndicatorStyle.DARK,\r\n\ttop : 100,\r\n\tleft : 100,\r\n\theight : Ti.UI.SIZE,\r\n\twidth : Ti.UI.SIZE\r\n});\r\n\r\n// The activity indicator must be added to a window or view for it to appear\r\nwin2.add(activityIndicator);\r\n\r\n// eventListeners must always be loaded before the event is likely to fire\r\n// hence, the open() method must be positioned before the window is opened\r\nwin2.addEventListener('open', function(e) {\r\n\tactivityIndicator.show();\r\n\t// do some work that takes 6 seconds\r\n\t// ie. replace the following setTimeout block with your code\r\n\t\r\n\t//setTimeout(function() { . // If we unblock this the activityIndicator will be shown\r\n\t\tfor (var i=40000; i>0; i--){\r\n\t\tTi.API.info(\"Test: \"+i); \t\r\n\t\t}\r\n \r\n\t\te.source.close();\r\n\t\tactivityIndicator.hide();\r\n\t//}, 6000); // If we unblock this the activityIndicator will be shown\r\n});\r\nwin1.open();\r\nwin2.open(); \r\n{code}\r\n\r\n*Note:* If you can just unblock the setTimeout function then the code will work fine.\r\n\r\nThanks", "attachment": [], "flagged": false, "summary": "Activity indicator not working without the setTimeout", "creator": { "name": "fhaque", "key": "fhaque", "displayName": "Fazlul Haque", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "fhaque", "key": "fhaque", "displayName": "Fazlul Haque", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [], "maxResults": 4, "total": 4, "startAt": 0 } } }