{ "id": "64129", "key": "TIMOB-3497", "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": "11355", "description": "Mobile 1.8.0 M02", "name": "Sprint 2011-23", "archived": true, "released": true, "releaseDate": "2011-06-13" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-06-06T15:44:05.000+0000", "created": "2011-04-15T03:45:55.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-06-06T15:53:34.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": "{html}
When changing orientation mode from portrait to landscape and\r\nvice versa, the current view changes. (though the currentPage will\r\nbe correct, the visible view on screen is incorrect)
\r\nThis has been tested on 1.6.1 and 1.6.x CI build. And iPhone\r\n4.2
Steps to reproduce this error:
\r\nScroll to view 22 while in portrait mode.
\r\nRotate to landscape mode.
\r\nRotate back to portrait mode. (you'll notice the view changes to\r\n29)
\r\nRotate to landscape mode. (the view changes to view 19)
\r\nThe currentPage is still 22.
Code:
\r\nvar win = Titanium.UI.createWindow({ \r\n backgroundColor:'#fff',\r\n orientationModes : [Titanium.UI.LANDSCAPE_LEFT, Titanium.UI.LANDSCAPE_RIGHT, \r\n Titanium.UI.PORTRAIT, Titanium.UI.UPSIDE_PORTRAIT]\r\n});\r\nvar views_arr = [];\r\nfor(var i=0; i<30; i++) {\r\n views_arr[i] = Ti.UI.createView({\r\n top:0,\r\n left:0,\r\n width:320,\r\n height:480,\r\n borderColor:'#00F',\r\n borderWidth:1 \r\n });\r\n var lbl = Titanium.UI.createLabel({\r\n text:'view '+i,\r\n color:'#000',\r\n top: 50,\r\n left:50\r\n });\r\n views_arr[i].add(lbl);\r\n}\r\n\r\nscrollableView = Titanium.UI.createScrollableView({\r\n views: views_arr,\r\n top: 0,\r\n left: 0,\r\n width:'100%',\r\n height:'100%'\r\n});\r\nTitanium.Gesture.addEventListener('orientationchange', function(e){\r\n Ti.API.info('CurrentPage: ' + scrollableView.currentPage); \r\n});\r\nwin.add(scrollableView);\r\nwin.open();
\r\n