{ "id": "97369", "key": "TIMOB-9966", "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": "13574", "description": "Sprint 2012-15 Core", "name": "Sprint 2012-15 Core", "archived": true, "released": true, "releaseDate": "2012-07-30" }, { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" }, { "id": "14126", "description": "Sprint 2012-19 Core", "name": "Sprint 2012-19 Core", "archived": true, "released": true, "releaseDate": "2012-09-24" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-09-11T20:11:25.000+0000", "created": "2012-07-16T11:02:14.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "core", "layout", "module_scrollview", "qe-review", "qe-testadded" ], "versions": [ { "id": "13273", "description": "Release 2.0.2", "name": "Release 2.0.2", "archived": false, "released": true, "releaseDate": "2012-05-31" } ], "issuelinks": [ { "id": "18891", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "90895", "key": "TIMOB-8891", "fields": { "summary": "Android: scrollView not scrolling if contentHeight = 'auto'", "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": "19074", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "91845", "key": "TIMOB-10003", "fields": { "summary": "Android: Ti.UI.SIZE does not work well with nested views", "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 } } } }, { "id": "20758", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "100377", "key": "TIMOB-10860", "fields": { "summary": "Android: ScrollView not scrolling anymore 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-12-19T21:46:09.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": "The following test case does not work with horizontal layout:\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\n\r\n\r\nWhen we have an inner view with size behavior and a horizontal layout child, The scroll view does not scroll either:\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 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}\r\n\r\nExpected Result (for both test cases):\r\nThe scroll view should be able to scroll vertically. (works in iOS)\r\n\r\nActual Result (for both test cases):\r\nIt does not scroll", "attachment": [], "flagged": false, "summary": "Android: ScrollView not scrolling with horizontal layout", "creator": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "208563", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR Ready: https://github.com/appcelerator/titanium_mobile/pull/2613", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-19T16:55:01.000+0000", "updated": "2012-07-19T16:55:01.000+0000" }, { "id": "208809", "author": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "body": "I can confirm it works! Thanks a lot Allen", "updateAuthor": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "created": "2012-07-21T02:23:26.000+0000", "updated": "2012-07-21T02:23:26.000+0000" }, { "id": "211489", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "There are still some issues here. It seems that scroll view cannot scroll when it contains table view (there is no problem with other content).\r\n\r\n\r\nHere is my test case:\r\n\r\n{code}\r\n\r\nfunction createContent() {\r\n\tvar wrapper = Ti.UI.createView({\r\n\t\twidth: Ti.UI.FILL,\r\n\t\theight: Ti.UI.SIZE,\r\n\t\tbackgroundColor: '#f00',\r\n\t\tlayout: 'horizontal'\r\n\t});\r\n\t\r\n\tvar label1 = Ti.UI.createLabel({\r\n\t\ttext: 'Label 1',\r\n\t\twidth: '50%'\r\n\t});\r\n\t\r\n\tvar cb1 = Ti.UI.createSwitch({\r\n\t\tvalue: false\r\n\t});\r\n\t\r\n\twrapper.add(label1);\r\n\twrapper.add(cb1);\r\n\t\r\n\treturn wrapper;\r\n}\r\n\r\nvar win = Ti.UI.createWindow({\r\n\tnavBarHidden: true\r\n});\r\n\r\nvar scrollView = Ti.UI.createScrollView({\r\n\theight: Ti.UI.FILL,\r\n\twidth: Ti.UI.FILL,\r\n\tbackgroundColor: '#0f0',\r\n\tlayout: 'horizontal',\r\n\t//layout: 'vertical',\r\n\tcontentHeight: Ti.UI.SIZE,\r\n\tcontentWidth: Ti.UI.FILL\r\n});\r\n\r\nwin.add(scrollView);\r\n\r\nfor (var i = 0; i < 10; ++i) {\r\n\tscrollView.add(createContent());\r\n}\r\n\r\nvar table = Ti.UI.createTableView({\r\n\tbackgroundColor: '#00f',\r\n\theight: Ti.UI.SIZE\r\n});\r\n\r\nscrollView.add(table);\r\n\r\nvar rows = [];\r\nfor (i = 0; i < 25; ++i) {\r\n\trows.push({ title: 'Row ' + i});\r\n}\r\n\r\ntable.setData(rows);\r\n\r\nwin.open();\r\n{code}\r\n\r\nMy environment info:\r\n\r\nTitanium SDK version: 2.2.0 (08/03/12 16:41 9c1640f)\r\nv8\r\nAndroid 4.0.3\r\nThinkpad Tablet\r\nMountain Lion\r\n\r\n\r\nIf you run this example, you should see that scroll view cannot scroll.\r\n\r\n\r\nThe same example does not work on iOS, it seems that horizontal layout is causing it (most of the content is not visible on the screen). If horizontal layout is replaced with vertical, it works fine.\r\nAndroid on the other hand has issue with vertical layout. It seems that vertical layout works like horizontal.", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2012-08-06T03:07:10.000+0000", "updated": "2012-08-06T03:07:10.000+0000" }, { "id": "214448", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR for 2_1_X branch: https://github.com/appcelerator/titanium_mobile/pull/2741", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-14T14:53:36.000+0000", "updated": "2012-08-14T14:53:36.000+0000" }, { "id": "215104", "author": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@Ivan - It would be great if you can create a new ticket for the remaining issue so that we can test it out separately.", "updateAuthor": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-19T21:29:48.000+0000", "updated": "2012-08-19T21:29:48.000+0000" }, { "id": "215116", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2012-08-20T04:30:40.000+0000", "updated": "2012-08-20T04:30:40.000+0000" }, { "id": "215135", "author": { "name": "tsmolich", "key": "tsmolich", "displayName": "Tamila Smolich", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as fixed.\r\nTested and verified on:\r\nTitanium Studio, build: 2.1.1.201208091713\r\nTitanium SDK, build: 2.1.2.v20120816171609\r\nDevices: Nexus 7 tab (4.1.1), HTC Evo (4.0.3), Android Emulator 2.2", "updateAuthor": { "name": "tsmolich", "key": "tsmolich", "displayName": "Tamila Smolich", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-20T10:09:48.000+0000", "updated": "2012-08-20T10:09:48.000+0000" }, { "id": "217387", "author": { "name": "echampet", "key": "echampet", "displayName": "Etienne Champetier", "active": true, "timeZone": "Europe/Berlin" }, "updateAuthor": { "name": "echampet", "key": "echampet", "displayName": "Etienne Champetier", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-09-04T07:14:52.000+0000", "updated": "2012-09-04T07:14:52.000+0000" }, { "id": "217389", "author": { "name": "echampet", "key": "echampet", "displayName": "Etienne Champetier", "active": true, "timeZone": "Europe/Berlin" }, "updateAuthor": { "name": "echampet", "key": "echampet", "displayName": "Etienne Champetier", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-09-04T07:16:10.000+0000", "updated": "2012-09-04T07:16:10.000+0000" }, { "id": "217959", "author": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "ScrollView not scrolling .\r\n\r\nTested with Titanium Studio:2.1.2.201208301612\r\nTested with Titanium SDK: 2.2.0.v20120831200114", "updateAuthor": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2012-09-07T04:53:59.000+0000", "updated": "2012-09-07T04:53:59.000+0000" }, { "id": "218488", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing the ticket again. The original test case still works fine, and there are two separate tickets for the issues mentioned in this ticket.", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-11T18:20:12.000+0000", "updated": "2012-09-11T18:20:12.000+0000" }, { "id": "218489", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening to change time left", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-11T18:26:16.000+0000", "updated": "2012-09-11T18:26:16.000+0000" } ], "maxResults": 12, "total": 12, "startAt": 0 } } }