{ "id": "90895", "key": "TIMOB-8891", "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-04T03:07:49.000+0000", "created": "2012-04-25T15:31:20.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "core", "module_scrollview", "qe-testadded" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" } ], "issuelinks": [ { "id": "18891", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "97369", "key": "TIMOB-9966", "fields": { "summary": "Android: ScrollView not scrolling with horizontal layout", "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": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-07-16T23:42:54.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": "scrollView not scrolling if contentHeight = 'auto' and height of the childView of scrollView is set to SIZE.\r\nIt works fine if you set the height of the childView to something static instead of SIZE\r\n\r\nh4. Steps to repro\r\nStep 1: run code\r\nStep 2: try to scroll (if it doesn't scroll then it is still broken)\r\n\r\n{code:js}\r\nvar win = Ti.UI.createWindow();\r\nwin.open();\r\n\r\nvar scrollView = Ti.UI.createScrollView({\r\n\tcontentHeight:'auto',\r\n\tbackgroundColor: 'green'\r\n});\r\nwin.add(scrollView);\r\n\r\nvar innerView = Ti.UI.createView({\r\n\theight:Ti.UI.SIZE, // works if set to 1000\r\n\tlayout:'vertical',\r\n\tleft:0,\r\n\ttop:0,\r\n\tright:0\r\n});\r\nscrollView.add(innerView);\r\n\r\nvar colors = ['red', 'blue', 'pink', 'white', 'black'];\r\n\r\nvar max = 10;\r\nfor(var i = 0; i < max; i++){\r\n\tinnerView.add(Ti.UI.createView({\r\n\t\tbackgroundColor: colors[i%colors.length],\r\n\t\theight: 100,\r\n\t\ttop: 20\r\n\t}));\r\n}\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: scrollView not scrolling if contentHeight = 'auto'", "creator": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "TiSDK 2.1.0\r\nHTC Sensation 2.3.x", "comment": { "comments": [ { "id": "198736", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with Droid 3 2.3.4 with 2.1.0.v20120615104152", "updateAuthor": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-15T13:08:27.000+0000", "updated": "2012-06-15T13:08:27.000+0000" }, { "id": "201481", "author": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Reopening to update labels.", "updateAuthor": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2012-07-04T03:07:13.000+0000", "updated": "2012-07-04T03:07:13.000+0000" }, { "id": "202030", "author": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "body": "I think commit \r\n[76a526da112a1a478e0ac3d78a80e5379b0a06be|https://github.com/appcelerator/titanium_mobile/commit/76a526da112a1a478e0ac3d78a80e5379b0a06be] broke it\r\n\r\nIt s not working anymore.", "updateAuthor": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "created": "2012-07-08T10:39:40.000+0000", "updated": "2012-07-08T10:39:40.000+0000" }, { "id": "203207", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This seems to be working for me. Can you please try the latest version of the sdk?", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-13T15:23:00.000+0000", "updated": "2012-07-13T15:23:00.000+0000" }, { "id": "203209", "author": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the example above works fine on current master and 2_1_X branch.", "updateAuthor": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-13T15:23:10.000+0000", "updated": "2012-07-13T15:23:10.000+0000" }, { "id": "203251", "author": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "body": "Ok so it still didnt work for me because i was not using the innerView. SO this would be my example which doesnt work ( works on iphone by the way). Remark the horizontal layout which is very important for me.\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow();\r\nwin.open();\r\n \r\nvar scrollView = Ti.UI.createScrollView({\r\n contentHeight:'auto',\r\n contentWidth:0,\r\n layout:'horizontal',\r\n backgroundColor: 'green'\r\n});\r\nwin.add(scrollView);\r\n\r\nvar colors = ['red', 'blue', 'pink', 'white', 'black'];\r\n \r\nvar max = 120;\r\nfor(var i = 0; i < max; i++){\r\n scrollView.add(Ti.UI.createView({\r\n backgroundColor: colors[i%colors.length],\r\n height: 100,\r\n left: 10,\r\n width: 100,\r\n top: 10\r\n }));\r\n}\r\n{code}\r\nNow if i try with the innerView it wont work either, but for another reason. This time the innerView wont increase in height. Most obviously due to the horizontal layout.\r\n{code}\r\nvar win = Ti.UI.createWindow();\r\nwin.open();\r\n \r\nvar scrollView = Ti.UI.createScrollView({\r\n contentHeight:'auto',\r\n contentWidth:0,\r\n backgroundColor: 'green'\r\n});\r\nwin.add(scrollView);\r\n \r\nvar innerView = Ti.UI.createView({\r\n height:Ti.UI.SIZE, // works if set to 1000\r\n layout:'horizontal',\r\n left:0,\r\n top:0,\r\n right:0\r\n});\r\nscrollView.add(innerView);\r\n \r\nvar colors = ['red', 'blue', 'pink', 'white', 'black'];\r\n \r\nvar max = 120;\r\nfor(var i = 0; i < max; i++){\r\n innerView.add(Ti.UI.createView({\r\n backgroundColor: colors[i%colors.length],\r\n height: 100,\r\n left: 10,\r\n width: 100,\r\n top: 10\r\n }));\r\n}\r\n{code}", "updateAuthor": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "created": "2012-07-14T06:54:54.000+0000", "updated": "2012-07-14T06:54:54.000+0000" }, { "id": "207734", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-16T11:03:22.000+0000", "updated": "2012-07-16T11:03:22.000+0000" }, { "id": "207974", "author": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "body": "Thanks a lot Allen!", "updateAuthor": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "created": "2012-07-16T23:42:54.000+0000", "updated": "2012-07-16T23:42:54.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }