{ "id": "82270", "key": "TIMOB-5972", "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": "12085", "description": "Mobile @ HQ", "name": "Sprint 2011-45", "archived": true, "released": true, "releaseDate": "2011-11-14" }, { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-11-11T09:39:24.000+0000", "created": "2011-11-03T07:15:27.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "currentpage", "ios", "module_scrollableview", "parity", "resize", "scrollableView", "width" ], "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": "13834", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "81134", "key": "TIMOB-5440", "fields": { "summary": "iOS: Kitchensink - Base UI>Views>Scroll Views>Scrollable View, rotating the device results in visible view changing to another", "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": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-12-07T15:59:05.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": "h3. Problem\r\nWhen the width of the ScrollableView changes, the current page on the screen inexplicably jumps to 0, while the currentPage property itself remains whatever you set it to. \r\nThis is visible if you press \"scroll\" and then the \"resize\" button.\r\n\r\nh3. Reproducible steps:\r\n \r\n1. Run the code below\r\n2. Scroll to page 1 on the green square\r\n3. Press the scroll button\r\n4. Press the resize button\r\n\r\nnotice that the current page is changed\r\n\r\nh3. Expected behavior:\r\nCustomer wants to keep the number of the current page after press the resize button.\r\n\r\nh3. More details:\r\nTested in a mobile device with Android, and worked well.\r\n\r\nh3. Sample code:\r\n{code}\r\nvar win = Titanium.UI.createWindow({\r\n \tbackgroundColor : '#f0f0f0',\r\n\tlayout : 'vertical'\r\n});\r\n\r\nvar views = [];\r\n\r\nfor(var i = 0; i < 3; i++) {\r\n\tviews[i] = Ti.UI.createView();\r\n\tviews[i].add(Ti.UI.createLabel({\r\n\t\ttext : i,\r\n\t\twidth : 'auto',\r\n\t\theight : 'auto'\r\n\t}));\r\n}\r\n\r\nvar parentView = Ti.UI.createView({\r\n\twidth : 100,\r\n\theight : 100\r\n});\r\nvar scrollableView = Ti.UI.createScrollableView({\r\n\tborderColor : 'green',\r\n\tborderWidth : 1,\r\n\tviews : views,\r\n\tshowPagingControls : true,\r\n\tpagingControlHeight : 20,\r\n\tcurrentPage : 2\r\n});\r\n\r\nvar scrollButton = Ti.UI.createButton({\r\n\ttitle : 'scroll',\r\n\twidth : 100,\r\n\theight : 50\r\n});\r\nscrollButton.addEventListener('click', function() {\r\n\tscrollableView.currentPage = 2;\r\n});\r\nvar resizeButton = Ti.UI.createButton({\r\n\ttitle : 'resize',\r\n\twidth : 100,\r\n\theight : 50\r\n});\r\nresizeButton.addEventListener('click', function() {\r\n\tparentView.width = 200;\r\n\tTi.API.info('currentPage: ' + scrollableView.currentPage + ' (supposedly...)');\r\n});\r\n\r\nparentView.add(scrollableView);\r\n\r\nwin.add(parentView);\r\n\r\nwin.add(scrollButton);\r\nwin.add(resizeButton);\r\nwin.open();\r\n\r\n{code}\r\nh3. Helpdesk\r\nAPP-256873 \r\n", "attachment": [], "flagged": false, "summary": " When the width of the ScrollableView is changed the current page of a ScrollableView is changed", "creator": { "name": "framirez", "key": "framirez", "displayName": "Francisco Antonio Duran Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "framirez", "key": "framirez", "displayName": "Francisco Antonio Duran Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Samsung Galaxy Fit-Android Version : 2.2.1\r\niPhone 3G Version: 4.3.5\r\nTitanium Studio, build: 1.0.6.201110251616\r\nTitanium SDK: 1.7.5.v20111031161854 & 1.8.0.v20111028154620\r\niOS SDK: 4.3", "comment": { "comments": [ { "id": "172037", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "pull pending #656", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-11-09T09:14:19.000+0000", "updated": "2011-11-09T09:14:19.000+0000" }, { "id": "175261", "author": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested on Ti Studio 1.0.7.201112061404\r\n
Ti Mob SDK 1.8.0.1.v20111207091653\r\n
OSX Lion\r\niPhone 4S OS 5.0.1\r\n\r\nExpected behavior of the current page being kept the same after resize is shown\r\n\r\n", "updateAuthor": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-07T15:59:05.000+0000", "updated": "2011-12-07T15:59:05.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }