{ "id": "91206", "key": "TIMOB-8949", "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": "13502", "description": "Sprint 2012-14 Core", "name": "Sprint 2012-14 Core", "archived": true, "released": true, "releaseDate": "2012-07-15" }, { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-07-19T14:58:26.000+0000", "created": "2012-05-02T10:40:22.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "SupportTeam", "core", "module_window", "qe-testadded", "regression" ], "versions": [ { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" } ], "issuelinks": [], "assignee": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-07-26T08:56:56.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": "*Code*\r\n{code}\r\nvar NUMBER_OF_OBJECTS = 60; // number of views to create\r\n \r\nvar createRandomView = function()\r\n{\r\n var height = returnRandomNumber(90);\r\n var width = returnRandomNumber(90);\r\n var x = returnRandomNumber(99 - width);\r\n var y = returnRandomNumber(99 - height);\r\n var color = returnRandomColor();\r\n \r\n var view = Ti.UI.createView({\r\n width: width + '%',\r\n height: height + '%',\r\n left: x + '%',\r\n top: y + '%',\r\n backgroundColor: color,\r\n mySize: (width + height) // should be * instead of +, but randomness is a nice thing, in this case :)\r\n });\r\n \r\n return view;\r\n}\r\n \r\nvar returnRandomNumber = function(_max)\r\n{\r\n // create a random number between 1 and _max\r\n var num = Math.floor((Math.random() * _max) + 1);\r\n Ti.API.info('==> max: ' + _max + ' | random: ' + num);\r\n \r\n return num;\r\n}\r\n \r\nvar returnRandomColor = function()\r\n{\r\n // create a random color value string\r\n var letters = '0123456789ABCDEF'.split('');\r\n var color = '#';\r\n for (var i = 0; i < 6; i++) \r\n color += letters[Math.round(Math.random() * 15)];\r\n \r\n return color;\r\n}\r\n \r\nvar sortArrayBackToFront = function(_array)\r\n{\r\n // sort the array depending on the mySize property\r\n var compare = function(a, b) \r\n {\r\n if(a.mySize < b.mySize)\r\n return 1;\r\n \r\n if(a.mySize > b.mySize)\r\n return -1;\r\n \r\n return 0;\r\n }\r\n \r\n _array.sort(compare); \r\n}\r\n \r\n// create window\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: 'white',\r\n orientationModes: [Ti.UI.PORTRAIT, Ti.UI.LANDSCAPE_LEFT, Ti.UI.LANDSCAPE_RIGHT]\r\n});\r\n \r\nvar views = [];\r\n \r\n// create random views\r\nfor (var i = 0; i < NUMBER_OF_OBJECTS; i++)\r\n{\r\n var view = createRandomView();\r\n views.push(view);\r\n}\r\n \r\n// sort array depending on the size of each view\r\nsortArrayBackToFront(views);\r\n \r\n//add all views to the window\r\nfor (var i = 0; i < views.length; i++) \r\n win.add(views[i]);\r\n \r\nwin.open();\r\n{code}\r\n\r\n*Expected behavior*\r\nWhen changing the orientation of the device, it should reposition/resize controls nice and smoothly, like in 1.8.2.\r\n\r\n*Actual behavior*\r\nRight now, the controls resize/reposition after the window has changed orientation, it's not smooth, there is a lag noticeable in 2.0 and above.\r\n\r\n*Notes*\r\n-Works fine in 1.8.2 and below, this issue occurs after 2.0.\r\n-Tested on an iPhone 3GS running iOS 5.", "attachment": [], "flagged": false, "summary": "iOS: Window layout alignment issue on rotating to landscape", "creator": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "environment": null, "comment": { "comments": [ { "id": "193783", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello, \r\n\r\nany ETA on the fix or either the comment? Customer is waiting for us on this.\r\n\r\nBest,\r\n\r\nMauro ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2012-05-04T13:20:55.000+0000", "updated": "2012-05-04T13:20:55.000+0000" }, { "id": "193842", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "@Mauro @Junaid\r\nPlease reduce it to a test case. Given that this is a behavior change from 1.8.x to 2.1.0 it would also be helpful to know what they changed in the actual layout parameters between the two versions", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-05-04T15:19:43.000+0000", "updated": "2012-05-04T15:19:43.000+0000" }, { "id": "193844", "author": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "body": "I'm working on a smaller test case now.", "updateAuthor": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "created": "2012-05-04T15:31:38.000+0000", "updated": "2012-05-04T15:31:38.000+0000" }, { "id": "193870", "author": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "body": "Vishal, this is the closes I could get. It doesn't *exactly* replicate the same issue as the original attachment, however there is a delay noticeable, especially on my device (iPhone 3GS). You might have to play around with the constant at the top, if you are using a newer device.\r\n\r\nUsing the 1.8.2 SDK, I can see that it nicely and smoothly animates the views to resize, every time you change the orientation.\r\n\r\nUsing 2.0.1GA2, it kind of 'flickers' and suddenly just jumps to the new size/orientation. It doesn't smoothly animate the views as the older SDK. It's noticeable if you look very closely, you might have to rotate the device a few times to see what I mean. \r\n\r\n\r\n*EDIT: Code is now in the original ticket description.*", "updateAuthor": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "created": "2012-05-04T17:41:17.000+0000", "updated": "2012-07-06T10:59:44.000+0000" }, { "id": "193977", "author": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "body": "Just as an update, I just tried the above code on an iPad 1 running iOS 5.0.1 and the issue there is easily viewable. I'm editing this ticket to add regression label, it works nice and smoothly on 1.8.2 but it flickers/jumps/snaps on 2.0.1GA2.", "updateAuthor": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "created": "2012-05-07T10:49:27.000+0000", "updated": "2012-05-07T10:49:27.000+0000" }, { "id": "201880", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Unable to see this issue at 60 views (test value) with release 2.1.0.GA on iPod 3GT, iPhone 3GS, iPhone 4. Resizing issues begin to appear at about 200 views. Tested with 60 views on current 1.8.3 CI on 3GT (slowest device) demonstrates slower rotation redraws at this number of views although they are still rendered correctly. At 200 views 1.8.3 demonstrates the same issues as 2.1.0.GA.\r\n\r\nGoing to mark this ticket invalid without further evidence of customer's app behaving inappropriately on latest 2.1.0.GA and source code distributed *PRIVATELY* to developers along with explicit reproduction steps. A response before the end of Sprint 14 (7/13/12) is required. The ticket will be marked INVALID on that date.\r\n\r\nA ticket for improving view redraw on rotation can be submitted instead and will be treated as a feature, not a regression.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-06T12:50:43.000+0000", "updated": "2012-07-09T13:13:44.000+0000" }, { "id": "208522", "author": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "reopen to add fix version", "updateAuthor": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-19T14:58:09.000+0000", "updated": "2012-07-19T14:58:09.000+0000" } ], "maxResults": 16, "total": 16, "startAt": 0 } } }