{ "id": "152640", "key": "TIMOB-19883", "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": "2015-11-06T01:19:36.000+0000", "created": "2015-11-04T11:14:21.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "activityindicator" ], "versions": [ { "id": "16904", "description": "Release 5.0.2", "name": "Release 5.0.2", "archived": true, "released": true, "releaseDate": "2015-10-01" } ], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2017-03-24T17:55:47.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "I try to use a activityIndicator, but get a redscreen everytime i set a style. \r\n\r\nIt seems that Ti.UI.ActivityIndicatorStyle is undefined\r\n\r\nAccording to the docs this should work \r\nhttp://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.ActivityIndicator-property-style\r\n\r\nCreated a new project in Titanium studio fith following code \r\n{code:javascript}\r\n// this sets the background color of the master UIView (when there are no windows/tab groups on it)\r\nTitanium.UI.setBackgroundColor('#000');\r\n \r\n// create tab group\r\nvar tabGroup = Titanium.UI.createTabGroup();\r\n \r\n \r\n//\r\n// create base UI tab and root window\r\n//\r\nvar win1 = Titanium.UI.createWindow({ \r\n title:'Tab 1',\r\n backgroundColor:'#fff'\r\n});\r\nvar tab1 = Titanium.UI.createTab({ \r\n icon:'KS_nav_views.png',\r\n title:'Tab 1',\r\n window:win1\r\n});\r\n \r\nvar label1 = Titanium.UI.createLabel({\r\n color:'#999',\r\n text:'I am Window 1',\r\n font:{fontSize:20,fontFamily:'Helvetica Neue'},\r\n textAlign:'center',\r\n width:'auto'\r\n});\r\n \r\n var activityIndicator = Ti.UI.createActivityIndicator({\r\n style: Ti.UI.ActivityIndicatorStyle.DARK, // redscreen: undefined is not an object (evaluating 'Ti.UI.ActivityIndicatorStyle.DARK')\r\n // style: 2, // works\r\n message: 'Loading...',\r\n color: '#000',\r\n top: 0,\r\n left: 0,\r\n height: 100,\r\n width: 100\r\n });\r\n \r\n \r\n win1.add(activityIndicator);\r\n activityIndicator.show();\r\n \r\nwin1.add(label1);\r\n \r\n//\r\n// create controls tab and root window\r\n//\r\nvar win2 = Titanium.UI.createWindow({ \r\n title:'Tab 2',\r\n backgroundColor:'#fff'\r\n});\r\nvar tab2 = Titanium.UI.createTab({ \r\n icon:'KS_nav_ui.png',\r\n title:'Tab 2',\r\n window:win2\r\n});\r\n \r\nvar label2 = Titanium.UI.createLabel({\r\n color:'#999',\r\n text:'I am Window 2',\r\n font:{fontSize:20,fontFamily:'Helvetica Neue'},\r\n textAlign:'center',\r\n width:'auto'\r\n});\r\n \r\nwin2.add(label2);\r\n \r\n \r\n \r\n//\r\n// add tabs\r\n//\r\ntabGroup.addTab(tab1); \r\ntabGroup.addTab(tab2); \r\n \r\n \r\n// open tab group\r\ntabGroup.open();\r\n{code}\r\n\r\n", "attachment": [], "flagged": false, "summary": "iOS: Ti.UI.ActivityIndicatorStyle is undefined", "creator": { "name": "mathias.schmidt@pixell", "key": "mathias.schmidt@pixell", "displayName": "Mathias Schmidt", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "mathias.schmidt@pixell", "key": "mathias.schmidt@pixell", "displayName": "Mathias Schmidt", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 525, "state": "closed", "name": "2015 Sprint 23 SDK", "startDate": "2015-11-07T01:30:15.519Z", "endDate": "2015-11-21T01:30:00.000Z", "completeDate": "2015-11-23T02:54:27.887Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "369142", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "This bug is invalid: The user must have tested it with a Ti.SDK < 5.1.0. In that version, we did a parity feature to deprecate {{the Ti.UI.iPhone.ActivityIndicatorStyle}} namespace and make it possible under {{the Ti.UI.ActivityIndicatorStyle}}. So please use the old behavior on Ti.SDK before 5.1 and the normalized behavior on Ti.SDK 5.1.0 and later.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-11-06T01:19:36.000+0000", "updated": "2015-11-06T01:19:36.000+0000" }, { "id": "369387", "author": { "name": "mathias.schmidt@pixell", "key": "mathias.schmidt@pixell", "displayName": "Mathias Schmidt", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{{Ti.UI.iPhone.ActivityIndicatorStyle}} doesn't work neither with the same red screen message.\r\n\r\nThis is my updated test case:\r\n{code:javascript}\r\n var activityIndicator = Ti.UI.createActivityIndicator({\r\n style: Ti.UI.iPhone.ActivityIndicatorStyle.DARK, // undefined is not an object (evaluating 'Ti.UI.iPhone.ActivityIndicatorStyle')\r\n // style: Ti.UI.ActivityIndicatorStyle.DARK, // redscreen: undefined is not an object (evaluating 'Ti.UI.ActivityIndicatorStyle.DARK')\r\n // style: 2, // works\r\n message: 'Loading...',\r\n color: '#000',\r\n top: 0,\r\n left: 0,\r\n height: 100,\r\n width: 100\r\n });\r\n{code}", "updateAuthor": { "name": "mathias.schmidt@pixell", "key": "mathias.schmidt@pixell", "displayName": "Mathias Schmidt", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-11-09T11:40:18.000+0000", "updated": "2015-11-09T12:19:36.000+0000" }, { "id": "369412", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~mathias.schmidt@pixell] Still not reproducible. Make sure to clean your project (\"Project > Clean\" in Studio) and then run this again:\r\n\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow();\r\n\r\nvar activityIndicator = Ti.UI.createActivityIndicator({\r\n\tstyle : Ti.UI.iPhone.ActivityIndicatorStyle.DARK, //Works\r\n\tmessage : 'Loading...',\r\n\tcolor : '#000',\r\n\ttop : 0,\r\n\tleft : 0,\r\n\theight : 100,\r\n\twidth : 100\r\n});\r\n\r\nwin.add(activityIndicator);\r\nwin.open();\r\nactivityIndicator.show();\r\n{code}", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-11-09T15:57:02.000+0000", "updated": "2015-11-09T15:58:28.000+0000" }, { "id": "369538", "author": { "name": "mathias.schmidt@pixell", "key": "mathias.schmidt@pixell", "displayName": "Mathias Schmidt", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Yes, ({{Ti.UI.iPhone.ActivityIndicatorStyle.DARK}}) works, but all others not.\r\nIs somewere documented which styles i have to use on SDK 3.5?\r\n\r\n{code:java}\r\nvar activityIndicator = Ti.UI.createActivityIndicator({\r\n // style : Ti.UI.iPhone.ActivityIndicatorStyle.BIG, // shows no indicator\r\n // style : Ti.UI.iPhone.ActivityIndicatorStyle.BIG_DARK, // shows no indicator\r\n style : Ti.UI.iPhone.ActivityIndicatorStyle.DARK, // shows a small black and white indicator\r\n // style : Ti.UI.iPhone.ActivityIndicatorStyle.PLAIN, // shows no indicator\r\n message : 'Loading...',\r\n color : '#000',\r\n top : 0,\r\n left : 0,\r\n height : 100,\r\n width : 100\r\n});\r\n{code}", "updateAuthor": { "name": "mathias.schmidt@pixell", "key": "mathias.schmidt@pixell", "displayName": "Mathias Schmidt", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-11-10T11:20:46.000+0000", "updated": "2015-11-10T11:20:46.000+0000" }, { "id": "369686", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~mathias.schmidt@pixell], your issue is describing the issue using 5.0.2.GA, the last comment says 3.5. What version are you actually testing? We can ensure, that all types of activity indicators work on every version, except {{BIG_DARK}} which is just as documented only available on Android, Windows Phone and MobileWeb.\r\n\r\nHere is another demo code which should be it. If you have further questions, please join our Q&A or Slack community for more help. Thanks!\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: \"#666\",\r\n layout: \"vertical\"\r\n});\r\nvar activityIndicator1 = Ti.UI.createActivityIndicator({\r\n style : Ti.UI.iPhone.ActivityIndicatorStyle.PLAIN,\r\n top : 20\r\n});\r\n\r\nvar activityIndicator2 = Ti.UI.createActivityIndicator({\r\n style : Ti.UI.iPhone.ActivityIndicatorStyle.BIG,\r\n top : 20\r\n});\r\n\r\nvar activityIndicator3 = Ti.UI.createActivityIndicator({\r\n style : Ti.UI.iPhone.ActivityIndicatorStyle.DARK,\r\n top : 20\r\n});\r\n\r\nwin.add(activityIndicator1);\r\nwin.add(activityIndicator2);\r\nwin.add(activityIndicator3);\r\n\r\nwin.open();\r\n\r\nactivityIndicator1.show();\r\nactivityIndicator2.show();\r\nactivityIndicator3.show();\r\n{code} ", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-11-11T06:31:27.000+0000", "updated": "2015-11-11T06:31:27.000+0000" }, { "id": "369713", "author": { "name": "mathias.schmidt@pixell", "key": "mathias.schmidt@pixell", "displayName": "Mathias Schmidt", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Your example works in my environment. Thank you.\r\nCan't tell what the problem was before.\r\n\r\n{code:java}\r\n[INFO] Titanium SDK version: 3.5.0.GA\r\n[INFO] iPhone Device family: iphone\r\n[INFO] iPhone SDK version: 6.0\r\n[INFO] iPhone simulated device: iphone\r\n{code}\r\n\r\n", "updateAuthor": { "name": "mathias.schmidt@pixell", "key": "mathias.schmidt@pixell", "displayName": "Mathias Schmidt", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-11-11T08:46:04.000+0000", "updated": "2015-11-11T08:46:04.000+0000" }, { "id": "370989", "author": { "name": "timpoulsen", "key": "timpoulsen", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/Havana" }, "body": "You know, it would be really nice if your documentation indicated that the Ti.UI.ActivityIndicator style constants are valid only for 5.1.0+. I just wasted a half hour fighting this only to find that it's a documentation issue. This ticket should not have been resolved as invalid. It should have been turned into a docs ticket. ", "updateAuthor": { "name": "timpoulsen", "key": "timpoulsen", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/Havana" }, "created": "2015-11-20T16:29:29.000+0000", "updated": "2015-11-20T16:29:29.000+0000" }, { "id": "370990", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~timpoulsen] The docs have been updated too soon (for whatever reason). We are sorry for your time, but glad it's working now! 5.1.0 will most likely go live today, maybe thats a good consolation!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-11-20T16:31:50.000+0000", "updated": "2015-11-20T16:31:50.000+0000" }, { "id": "415591", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid with reference to the above comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-24T17:55:47.000+0000", "updated": "2017-03-24T17:55:47.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }