{ "id": "99347", "key": "TIMOB-10476", "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": null, "resolutiondate": null, "created": "2012-08-16T14:55:17.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "api", "reprod" ], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" }, { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:04:02.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Description:\r\nAfter orientation change, a cached view that is a child of a scollableView parent is not resized. As a result, part of the page becomes red (scollableView background color) during device rotation in ScrollableView.\r\n\r\nCode sample\r\n{code}\r\nvar tabGroup = Titanium.UI.createTabGroup();\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\nwin1.add(label1);\r\n \r\n// Create 2nd window with scrollable view\r\nvar win2 = Titanium.UI.createWindow({\r\n backgroundColor:'#0000ff',\r\n orientationModes:[Ti.UI.LANDSCAPE_RIGHT, Ti.UI.LANDSCAPE_LEFT, Ti.UI.PORTRAIT] \r\n});\r\nvar tab2 = Titanium.UI.createTab({ \r\n icon:'KS_nav_views.png',\r\n title:'Tab 2',\r\n window:win2\r\n});\r\nvar views = [];\r\n \r\nfor(var i = 0; i < 5; i++) {\r\n \r\n var view = Ti.UI.createView({\r\n top:0,\r\n bottom:0,\r\n left:0,\r\n right:0,\r\n backgroundColor: '#00ff00'\r\n });\r\n var viewLabel = Titanium.UI.createLabel({\r\n color:'#999',\r\n text:'Page '+(i+1),\r\n font:{fontSize:20,fontFamily:'Helvetica Neue'},\r\n textAlign:'center'\r\n });\r\n view.add( viewLabel );\r\n \r\n views.push( view );\r\n}\r\n \r\nvar sv = Ti.UI.createScrollableView({\r\n id:'scroller',\r\n showPagingControl:false,\r\n top:0,\r\n bottom:0,\r\n left:0,\r\n right:0,\r\n cacheSize:4,\r\n backgroundColor:\"#ff0000\",\r\n views: views \r\n});\r\n// work around\r\n// Ti.Gesture.addEventListener('orientationchange',function(e){\r\n // sv.currentPage = sv.currentPage;\r\n// });\r\nwin2.add(sv);\r\n \r\ntabGroup.addTab(tab1); \r\ntabGroup.addTab(tab2);\r\n \r\ntabGroup.open();\r\n{code}\r\n\r\nStep 1: run code example above\r\nStep 2: switch to tab 2\r\nStep 3: scroll to page 3\r\nStep 4: rotate the device to horizontal orientation (left or right)\r\n\r\nExpected results:\r\nAfter rotation \"page 3\" view rescales to fill the screen.\r\n\r\nActual results:\r\n1/3 of the page shows the scrollable view background and the view seems to maintain the protrait dimensions.\r\n", "attachment": [], "flagged": false, "summary": "iOS: Ti.UI.view - views with scrollableView parent are not resizing on orientation change when cached.", "creator": { "name": "rumbrasas", "key": "rumbrasas", "displayName": "Rima Umbrasas", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "rumbrasas", "key": "rumbrasas", "displayName": "Rima Umbrasas", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Mobile sdk-2.2.0.v20120810080115\r\nTitanium Studio, build: 2.1.1.201207271312\r\nDevice:\r\niPhone simulator\r\nIpad 2 version 5.1", "comment": { "comments": [ { "id": "244256", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue reproduces \n\nTested with\n\nTitanium Studio, build: 3.0.1.201212181159\nTitanium SDK version: 3.1.0 \nTitanium SDK version: 3.0.2 \niOS iPhone Simulator: iOS SDK version: 6.0\n", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-27T08:40:38.000+0000", "updated": "2013-03-27T08:40:38.000+0000" }, { "id": "420389", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I have been able to reproduce this issue with the following environment; \r\niPhone 7 (10.2) \r\nMacOS 10.11.6 (15G31) \r\nStudio 4.9.0.201705021158 \r\nTi SDK 6.1.0.v20170519131839 \r\nAppc NPM 4.2.9 \r\nAppc CLI 6.2.1 \r\nTi CLI 5.0.13 \r\nAlloy 1.9.11 \r\nArrow 2.0.0 \r\nXcode 8.2 (8C38) \r\nNode v4.8.2 \r\nJava 1.7.0_80", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-05-24T22:07:26.000+0000", "updated": "2017-05-24T22:07:26.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }