{ "id": "78076", "key": "TIMOB-4741", "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": "12083", "description": "", "name": "Sprint 2011-43", "archived": true, "released": true, "releaseDate": "2011-10-31" }, { "id": "12470", "description": "", "name": "Release 1.7.4", "archived": true, "released": true, "releaseDate": "2011-10-31" }, { "id": "11331", "description": "", "name": "Release 1.8.0", "archived": true, "released": true, "releaseDate": "2011-10-31" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-01-10T16:10:16.000+0000", "created": "2011-07-21T10:32:04.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "module_views", "qe-testadded" ], "versions": [ { "id": "11367", "description": "", "name": "Release 1.7.1", "archived": true, "released": true, "releaseDate": "2011-06-21" } ], "issuelinks": [ { "id": "13505", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "81779", "key": "TIMOB-5819", "fields": { "summary": "Android: Percentage-based views need to be re-drawn on device rotation", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "14095", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "83246", "key": "TIMOB-6390", "fields": { "summary": "iOS: Navbar is resized wrong when the orientation is changed", "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": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-01-10T16:10:16.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": "Views that have widths or positioning points based on percentages (e.g. \"width: 20%\" or \"left: 20%\") do not properly get updated on device rotation.\r\n\r\nDemonstration video: http://screencast.com/t/OmNKkLNHlW\r\n\r\nAs you can see, switching away from the tab and back to it properly renders the views.\r\n\r\n{code}\r\nvar tabGroup = Titanium.UI.createTabGroup();\r\nvar win1 = Titanium.UI.createWindow({ title: 'Tab 1', backgroundColor: '#fff' });\r\nvar tab1 = Titanium.UI.createTab({ icon: 'KS_nav_views.png', title: 'Tab 1', window: win1 });\r\n\r\nvar v1 = Ti.UI.createView({\r\n\tbackgroundColor: '#f00',\r\n\twidth: '20%',\r\n\tleft: '30%',\r\n\ttop: 0,\r\n\theight: '100%'\r\n});\r\n\r\nvar v2 = Ti.UI.createView({\r\n\tbackgroundColor: '#0f0',\r\n\twidth: '20%',\r\n\tright: '30%',\r\n\ttop: 0,\r\n\theight: '100%'\r\n});\r\n\r\nwin1.add(v1);\r\nwin1.add(v2);\r\nvar win2 = Titanium.UI.createWindow({ title: 'Tab 2', backgroundColor: '#fff' });\r\nvar tab2 = Titanium.UI.createTab({ icon: 'KS_nav_ui.png', title: 'Tab 2', window: win2 });\r\nvar label2 = Titanium.UI.createLabel({ color: '#999', text: 'I am Window 2', font: { fontSize: 20, fontFamily: 'Helvetica Neue' }, textAlign: 'center', width: 'auto' });\r\nwin2.add(label2);\r\ntabGroup.addTab(tab1);\r\ntabGroup.addTab(tab2);\r\ntabGroup.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: Percentage-based views need to be re-drawn on device rotation", "creator": { "name": "matthewcongrove", "key": "matthewcongrove", "displayName": "Matthew Congrove", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "matthewcongrove", "key": "matthewcongrove", "displayName": "Matthew Congrove", "active": true, "timeZone": "America/Chicago" }, "environment": "Titanium 1.7.1\r\niOS 4.3 / Android 2.3.3", "comment": { "comments": [ { "id": "160749", "author": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This will probably be affected by the composite layout work.", "updateAuthor": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-07-27T10:48:41.000+0000", "updated": "2011-07-27T10:48:41.000+0000" }, { "id": "160762", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Going to assume this will be part of the composite reimplementation. We need to create a parallel bug for Android.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-07-27T11:25:06.000+0000", "updated": "2011-07-27T11:25:06.000+0000" }, { "id": "170073", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "There is a bug in the sample code here in that no window orientations are provided. The android version of the bug has the proper bit of code, in that orientationmodes MUST be defined either on the tabgroup or the window itself.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-21T10:25:39.000+0000", "updated": "2011-10-21T10:25:39.000+0000" }, { "id": "170215", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Update on my previous comment: As of TIMOB-5331 & TIMOB-5332 my comment no longer applies. That is, orientationModes no longer MUST be defined on tabgroup or window. (See pull requests https://github.com/appcelerator/titanium_mobile/pull/576 and https://github.com/appcelerator/titanium_mobile/pull/577 for 1.7 and 1.8, respectively)", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-24T09:23:55.000+0000", "updated": "2011-10-24T09:23:55.000+0000" }, { "id": "170221", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{code}\r\nvar tabGroup = Titanium.UI.createTabGroup();\r\nvar win1 = Titanium.UI.createWindow({ title: 'Tab 1', backgroundColor: '#fff', fullscreen: 'false' });\r\nvar tab1 = Titanium.UI.createTab({ icon: 'KS_nav_views.png', title: 'Tab 1', window: win1 });\r\n\r\nwin1.orientationModes = [Ti.UI.PORTRAIT, Ti.UI.LANDSCAPE_LEFT, Ti.UI.LANDSCAPE_RIGHT, Ti.UI.UPSIDE_PORTRAIT];\r\n\r\nvar v1 = Ti.UI.createView({\r\n\tbackgroundColor: '#f00',\r\n\twidth: '30%',\r\n\tleft: '20%',\r\n\ttop: 0,\r\n\theight: '100%'\r\n});\r\n\r\nvar v3 = Ti.UI.createView({\r\n\tbackgroundColor: 'blue',\r\n\twidth: '80%',\r\n\tleft: '10%',\r\n\ttop: '10%',\r\n\theight: '80%'\r\n});\r\n\r\nvar v5 = Ti.UI.createView({\r\n\tbackgroundColor: 'gray',\r\n\twidth: '60%',\r\n\tleft: '20%',\r\n\ttop: '10%',\r\n\theight: '80%'\r\n});\r\n\r\nv3.add(v5);\r\nv1.add(v3);\r\nwin1.add(v1);\r\n\r\nvar v2 = Ti.UI.createView({\r\n\tbackgroundColor: '#0f0',\r\n\twidth: '30%',\r\n\tright: '20%',\r\n\ttop: 0,\r\n\theight: '100%'\r\n});\r\n\r\nvar v4 = Ti.UI.createView({\r\n\tbackgroundColor: 'blue',\r\n\twidth: '80%',\r\n\tleft: '10%',\r\n\ttop: '10%',\r\n\theight: '80%'\r\n});\r\n\r\nvar v6 = Ti.UI.createView({\r\n\tbackgroundColor: 'gray',\r\n\twidth: '60%',\r\n\tleft: '20%',\r\n\ttop: '10%',\r\n\theight: '80%'\r\n});\r\n\r\nv4.add(v6);\r\nv2.add(v4);\r\nwin1.add(v2);\r\n\r\nvar win2 = Titanium.UI.createWindow({ title: 'Tab 2', backgroundColor: '#fff', fullscreen: 'false' });\r\nwin2.orientationModes = [Ti.UI.PORTRAIT, Ti.UI.LANDSCAPE_LEFT, Ti.UI.LANDSCAPE_RIGHT, Ti.UI.UPSIDE_PORTRAIT];\r\nvar tab2 = Titanium.UI.createTab({ icon: 'KS_nav_ui.png', title: 'Tab 2', window: win2 });\r\nvar label2 = Titanium.UI.createLabel({ color: '#999', text: 'I am Window 2', font: { fontSize: 20, fontFamily: 'Helvetica Neue' }, textAlign: 'center', width: 'auto' });\r\nwin2.add(label2);\r\ntabGroup.addTab(tab1);\r\ntabGroup.addTab(tab2);\r\ntabGroup.open();\r\n{code}\r\n\r\nCompile the above code and Run\r\n1. Launch the Test\r\n2. Rotate the Device\r\n3. Click on Tab 2\r\n4. Rotate the Device\r\n\r\nActual:\r\nThe percentage-base views are not redrawn correctly\r\n\r\nExpected:\r\nShould redraw correctly after rotations", "updateAuthor": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-24T09:58:42.000+0000", "updated": "2011-10-24T09:58:42.000+0000" }, { "id": "175258", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing bug. Verified fix on:\r\n\r\nOS: Mac OS X Lion\r\nTitanium Studio, build: 1.0.7.201112061404\r\nSDK build: 1.8.0.1.v20111207151125\r\nDevice: iphone 4S Sprint (5.0.1)", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-12-07T15:45:15.000+0000", "updated": "2011-12-07T15:45:15.000+0000" }, { "id": "178018", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Open to update label\r\n", "updateAuthor": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-04T13:55:49.000+0000", "updated": "2012-01-04T13:55:49.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }