{ "id": "90423", "key": "TIMOB-8773", "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": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13401", "description": "Sprint 2012-09 Core", "name": "Sprint 2012-09 Core", "archived": true, "released": true, "releaseDate": "2012-05-06" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-07-10T02:33:16.000+0000", "created": "2012-04-17T16:19:37.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "SupportTeam", "core", "module_scrollview", "qe-testadded", "regression" ], "versions": [ { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" } ], "issuelinks": [ { "id": "22079", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "103346", "key": "TIMOB-11476", "fields": { "summary": "iOS: Crash on launch", "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": "16696", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "90431", "key": "TIMOB-8775", "fields": { "summary": "iOS: ScrollView does not scroll if contentHeight and contentWidth are not provided", "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 } } } } ], "assignee": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-10-17T21:38:56.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": "h4. Problem Description\r\ncontentWidth seems to be broken. In 1.82 the 'views' added to scrollView would fall underneath each other create tiles going down the window. In 2.0.1 they extend past the desired 'contentWidth' of 320.\r\n\r\nh4. Actual Results\r\nThe views doesn't follow the contentWidth size.\r\n\r\nh4. Expected Results\r\nThe view should respect the contentWidth\r\n\r\nh4. Test Case\r\n1. Create new mobile app\r\n2. Paste this code:\r\n\r\n{code}\r\nvar scrollView = Ti.UI.createScrollView({\r\n contentWidth: 320,\r\n contentHeight: 'auto',\r\n layout: 'horizontal'\r\n});\r\n \r\nvar things = [\r\n 'item1',\r\n 'item2',\r\n 'item3',\r\n 'item4',\r\n 'item5',\r\n 'item6' ];\r\n \r\nfor (var i = 0; i < things.length; i++) {\r\n \r\n var view = Ti.UI.createView({\r\n height: 90,\r\n width: 140,\r\n top: 10,\r\n left: 10,\r\n backgroundColor: '#CCC'\r\n });\r\n \r\n scrollView.add(view);\r\n \r\n};\r\n\r\nvar win = Ti.UI.createWindow();\r\nwin.add(scrollView);\r\nwin.open();\r\n{code}\r\n3. Compile this with Mobile SDK 2.0.1\r\n\r\nh4. Extra info \r\nIf you test this with 1.8.2, works like a charm.\r\n\r\nh4. Q/A Discussion \r\nhttp://developer.appcelerator.com/question/135543/scrollview--contentwidth--sdk-201", "attachment": [], "flagged": false, "summary": "iOS: contentWidth is broken", "creator": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "subtasks": [], "reporter": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "environment": null, "comment": { "comments": [ { "id": "192076", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Adjusting sprint to reflect PR submission date", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-20T12:41:27.000+0000", "updated": "2012-04-20T12:41:27.000+0000" }, { "id": "192511", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Updated test which also exercises autosizing functionality of the scrollview bounds when conjoined with horizontal and absolute contentWidth:\r\n\r\n{code}\r\nvar scrollView =  Ti.UI.createScrollView({\r\n    contentWidth: 320,\r\n    contentHeight: 'auto',\r\n\twidth:Ti.UI.SIZE,\r\n\theight:Ti.UI.SIZE,\r\n\tbackgroundColor:'blue',\r\n    layout: 'horizontal'\r\n});\r\n  \r\nvar things = [\r\n    'item1',\r\n    'item2',\r\n    'item3',\r\n    'item4',\r\n    'item5',\r\n    'item6' ];\r\n  \r\nfor (var i = 0;  i < things.length;  i++) {\r\n  \r\n    var view = Ti.UI.createView({\r\n        height: 90,\r\n        width: 140,\r\n        top: 10,\r\n        left: 10,\r\n        backgroundColor: '#CCC'\r\n    });\r\n  \r\n    scrollView.add(view);\r\n  \r\n};\r\n \r\nvar win = Ti.UI.createWindow();\r\nwin.add(scrollView);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-24T17:47:26.000+0000", "updated": "2012-04-24T17:47:26.000+0000" }, { "id": "192830", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PR 2073", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-04-26T15:51:33.000+0000", "updated": "2012-04-26T15:51:33.000+0000" }, { "id": "198573", "author": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing issue\r\n\r\nTested with Ti Studio build 2.1.0.201206131907\r\nTi Mobile SDK 2.1.0.v20120613210250 hash rc8ddb29e\r\nOSX Lion 10.7.3\r\niPhone 4S OS 5.1\r\n\r\nVerified that the views are laid out as expected", "updateAuthor": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-14T15:43:40.000+0000", "updated": "2012-06-14T15:43:40.000+0000" }, { "id": "202308", "author": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Re-opening to edit label", "updateAuthor": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-10T02:32:34.000+0000", "updated": "2012-07-10T02:32:34.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }