{ "id": "63928", "key": "TIMOB-3296", "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": "12075", "description": "", "name": "Sprint 2011-35", "archived": true, "released": true, "releaseDate": "2011-09-05" }, { "id": "11331", "description": "", "name": "Release 1.8.0", "archived": true, "released": true, "releaseDate": "2011-10-31" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-09-01T12:42:05.000+0000", "created": "2011-04-15T03:41:38.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "scrollview" ], "versions": [ { "id": "11233", "name": "Release 1.6.0", "archived": true, "released": true, "releaseDate": "2011-02-23" } ], "issuelinks": [], "assignee": { "name": "vsingh", "key": "vsingh", "displayName": "Vikramjeet Singh", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-09-13T10:02:25.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": "{html}

Horizontal scrolling does not work past the dimensions of the\r\ndevice's screen (unlike iOS implementation).

\r\n

HD ticket: http://developer.appcelerator.com/helpdesk/view/76287

\r\n

Sample:

\r\n
\r\nTitanium.UI.setBackgroundColor('#fff');\r\n\r\nvar win = Titanium.UI.createWindow({\r\n    backgroundColor: '#fff'\r\n});\r\n\r\nvar scrollView = Ti.UI.createScrollView({\r\n    contentWidth: 1100,\r\n    contentHeight: 367,\r\n    top:0,\r\n    left:0,\r\n    showVerticalScrollIndicator:false,\r\n    showHorizontalScrollIndicator:true,\r\n    backgroundColor:'#d6d0b7'\r\n});\r\n\r\nvar imageView = Ti.UI.createImageView({\r\n    image: 'http://placehold.it/1094x367',\r\n    width: 1094,\r\n    height: 367,\r\n    top: 50,\r\n    left: 0\r\n});\r\n\r\nscrollView.add(imageView);\r\nwin.add(scrollView);\r\n\r\nwin.open();\r\n
{html}", "attachment": [ { "id": "22751", "filename": "screenshot_337.png", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-08-31T15:14:14.000+0000", "size": 13728, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: ScrollView does not scroll horizontally", "creator": { "name": "rblalock", "key": "rblalock", "displayName": "Rick Blalock", "active": false, "timeZone": "America/Havana" }, "subtasks": [], "reporter": { "name": "rblalock", "key": "rblalock", "displayName": "Rick Blalock", "active": false, "timeZone": "America/Havana" }, "environment": null, "comment": { "comments": [ { "id": "132527", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Environment:\r\n* Ti 1.6.2 (main release)\r\n* Android 2.3.3\r\n\r\nThis seems to be a more general problem than the initial ticket implied. From my tests, horizontal scrolling does not work currently for Android scrollViews at all. See the following demonstration, where the relative vs absolute layouts and auto vs explicit dimensions can be toggled to show that scrolling does not work in either situation.\r\n\r\n\r\n{code:lang=javascript}\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\nvar win = Ti.UI.createWindow();\r\n\r\nvar viewWidth = 100;\r\nvar viewLeftPadding = 20;\r\nvar viewQty = 10;\r\n\r\nvar scrollViewWidth = (viewWidth * viewQty) + (viewLeftPadding * viewQty) + viewLeftPadding;\r\nTi.API.info(\"scrollViewWidth = \" + scrollViewWidth);\r\n\r\nvar scrollView = Ti.UI.createScrollView({\r\n backgroundColor:'red',\r\n contentWidth:scrollViewWidth,\r\n// relative layout and auto width also does not work\r\n// contentWidth:'auto',\r\n// layout:'horizontal',\r\n contentHeight:'auto',\r\n top:0,\r\n showVerticalScrollIndicator:true,\r\n showHorizontalScrollIndicator:true,\r\n scrollType:'horizontal'\r\n});\r\n\r\nfor (var i=0; i