{ "id": "81779", "key": "TIMOB-5819", "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": "12082", "description": "", "name": "Sprint 2011-42", "archived": true, "released": true, "releaseDate": "2011-10-24" }, { "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" }, { "id": "12571", "description": "CI for 1_7_X", "name": "Release 1.7.6", "archived": true, "released": false } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-01-03T16:08:16.000+0000", "created": "2011-10-20T14:08:12.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "module_views", "percentage", "qe-testadded", "rotation" ], "versions": [ { "id": "11971", "description": "iOS5 and select Android fixes", "name": "Release 1.7.3", "archived": true, "released": true, "releaseDate": "2011-10-18" }, { "id": "11331", "description": "", "name": "Release 1.8.0", "archived": true, "released": true, "releaseDate": "2011-10-31" } ], "issuelinks": [ { "id": "15530", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "63995", "key": "TIMOB-3363", "fields": { "summary": "Percentage width of views not respected", "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": "13505", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "78076", "key": "TIMOB-4741", "fields": { "summary": "iOS: 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": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-03-05T11:23:57.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": "Views that have widths or positioning points based on percentages do not properly get updated on device rotation.\r\n\r\nSample Code\r\n{noformat}\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{noformat}\r\n\r\nAs shown in the images, when started in Portrait, the views are shown properly.\r\nOn turning the emulator/ device to landscape, the white space between the two views can be noticed. Also, the bottoms of views are not visible.\r\n", "attachment": [ { "id": "23781", "filename": "Screen Shot 2011-10-20 at 3.02.40 PM.png", "author": { "name": "sbhimavarapu", "key": "sbhimavarapu", "displayName": "Sandeep Bhimavarapu", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-20T14:08:12.000+0000", "size": 76616, "mimeType": "image/png" }, { "id": "23782", "filename": "Screen Shot 2011-10-20 at 3.02.54 PM.png", "author": { "name": "sbhimavarapu", "key": "sbhimavarapu", "displayName": "Sandeep Bhimavarapu", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-20T14:08:12.000+0000", "size": 72021, "mimeType": "image/png" }, { "id": "23787", "filename": "Screen Shot 2011-10-20 at 3.51.51 PM.png", "author": { "name": "sbhimavarapu", "key": "sbhimavarapu", "displayName": "Sandeep Bhimavarapu", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-20T14:52:38.000+0000", "size": 80254, "mimeType": "image/png" }, { "id": "23788", "filename": "Screen Shot 2011-10-20 at 3.52.06 PM.png", "author": { "name": "sbhimavarapu", "key": "sbhimavarapu", "displayName": "Sandeep Bhimavarapu", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-20T14:52:38.000+0000", "size": 75939, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: Percentage-based views need to be re-drawn on device rotation", "creator": { "name": "sbhimavarapu", "key": "sbhimavarapu", "displayName": "Sandeep Bhimavarapu", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "sbhimavarapu", "key": "sbhimavarapu", "displayName": "Sandeep Bhimavarapu", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Product: Titanium Mobile\r\nTitanium SDK: 1.7.3, 1.8.0 CI\r\nPlatform OS: Android\r\nPlatform OS Version: 2.3.3", "comment": { "comments": [ { "id": "170285", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Run this code also\r\n{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\t//width: '30%',\r\n width: 'auto',\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\n//v3.add(v5);\r\n//v1.add(v3);\r\nwin1.add(v1);\r\n\r\nvar v2 = Ti.UI.createView({\r\n\tbackgroundColor: '#0f0',\r\n//\twidth: '30%',\r\n width: 'auto',\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\n//v4.add(v6);\r\n//v2.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}", "updateAuthor": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-24T17:55:13.000+0000", "updated": "2011-10-24T17:55:13.000+0000" }, { "id": "170332", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "Also merged to 1_7_X. In addition to 1.8.0 testing mentioned in the pull request (https://github.com/appcelerator/titanium_mobile/pull/575#issuecomment-2519262) , also tested the two failcases in 1_7_X branch, as well as several screens of KitchenSink.", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-10-25T08:41:59.000+0000", "updated": "2011-10-25T08:41:59.000+0000" }, { "id": "175119", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with 1.8.0.1.v20111205164258 v8/rhino on\r\nGalaxy 10.1 (3.1)\r\nDroid 1 (2.2.2)\r\nNexus S (2.3.6)\r\nEmulator (4.0)", "updateAuthor": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-06T17:09:32.000+0000", "updated": "2011-12-06T17:09:32.000+0000" }, { "id": "175460", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Here is the test case I used (I tweaked the percentages so the bug is more obvious to see).\r\n\r\n{code}\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\nvar win1 = Titanium.UI.createWindow({ \r\n title:'Tab 1',\r\n backgroundColor:'#e7e7e7'\r\n});\r\n\r\n\r\nvar label1 = Titanium.UI.createLabel({\r\n color:'black',\r\n top:20,\r\n //left:20,\r\n //right:20,\r\n right:'33%',\r\n left:'33%',\r\n height:'auto',\r\n backgroundColor:'orange',\r\n text:'Documentation is segmented by the Titanium platform youre using. While APIs are similar between both desktop and mobile, the documentation is specific to each platform to make it easier to understand whats supported and to concentrate on information specific to each platform.',\r\n font:{fontSize:20,fontFamily:'Helvetica Neue'},\r\n \r\n});\r\n var scrollView = Titanium.UI.createScrollView({\r\n contentWidth:'auto',\r\n contentHeight:'auto',\r\n top:0,\r\n backgroundColor:'yellow',\r\n showVerticalScrollIndicator:true,\r\n showHorizontalScrollIndicator:true,\r\n layout:'vertical'\r\n });\r\n\r\n\r\nvar view = Ti.UI.createView({\r\n height:100,\r\n //right:20,\r\n left:20,\r\n right:'33%',\r\n left:'33%',\r\n backgroundColor:'white',\r\n top:10,\r\n borderRadius:10,\r\n borderWidth:1,\r\n borderColor:'#808080',\r\n layout:'vertical'\r\n });\r\nscrollView.add(label1);\r\nscrollView.add(view);\r\nwin1.add(scrollView);\r\n\r\nwin1.open();\r\n{code}", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-08T14:06:55.000+0000", "updated": "2011-12-08T14:06:55.000+0000" }, { "id": "175467", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR ready https://github.com/appcelerator/titanium_mobile/pull/885", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-08T14:17:03.000+0000", "updated": "2011-12-08T14:17:03.000+0000" }, { "id": "175702", "author": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested on Ti Studio 1.0.7.201112080131\r\n

Ti Mob SDK 1.8.0.1.v20111209102124 v8/rhino\r\n

OSX Lion
\r\nDroid 3 2.3.4\r\n\r\nExpected behavior of percentage based views being displayed correctly (redrawn) is shown. Tested using all three test cases", "updateAuthor": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-10T15:23:45.000+0000", "updated": "2011-12-10T15:23:45.000+0000" }, { "id": "177906", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Open to add label\r\n", "updateAuthor": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-03T16:08:00.000+0000", "updated": "2012-01-03T16:08:00.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }