{ "id": "88624", "key": "TIMOB-8243", "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": "13277", "name": "Sprint 2012-08", "archived": true, "released": true, "releaseDate": "2012-04-22" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-07-12T04:16:42.000+0000", "created": "2012-03-23T12:34:01.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "api", "module_scrollview", "parity", "qe-and031912", "qe-nfc", "qe-testadded" ], "versions": [ { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" } ], "issuelinks": [], "assignee": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-07-12T14:23:26.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": "Steps to reproduce:\r\n1. Run the following code on Android:\r\n{code}\r\n//Create a Ti.UI.View with scroll view and do not put any content \r\n\r\nvar win = Ti.UI.createWindow();\r\nwin.backgroundColor = 'white';\r\n\r\nvar label = Ti.UI.createLabel({\r\n\ttext: 'View Size is: ',\r\n\ttop: 20,\r\n\tleft: 10,\r\n\theight: Ti.UI.SIZE,\r\n\twidth: Ti.UI.SIZE,\r\n\tcolor: 'black'\r\n});\r\n\r\nvar scrollView = Titanium.UI.createScrollView({\r\n contentHeight:'auto',\r\n contentWidth:'auto',\r\n showVerticalScrollIndicator:true,\r\n showHorizontalScrollIndicator:true\r\n});\r\n\r\nvar view = Ti.UI.createView();\r\n\r\nvar view2 = Ti.UI.createView({\r\n\tbackgroundColor:'red'\r\n})\r\n\r\nscrollView.add(view2);\r\n\r\nwin.addEventListener('postlayout', function layoutHandler(e) {\r\n\twin.removeEventListener('postlayout', layoutHandler);\r\n\tlabel.text = 'ScrollView\\'s height and width: ' + scrollView.size.height + 'x' + scrollView.size.width + '\\n' +\r\n\t 'Screen\\'s height and width: ' + win.size.height + 'x' + win.size.width;\r\n\twin.addEventListener('postlayout', layoutHandler);\r\n});\r\n\r\nwin.add(scrollView);\r\nwin.add(view);\r\nview.add(label);\r\n\r\nwin.open();\r\n\r\n{code}\r\n\r\nActual: A white view appears.\r\nExpected: A red view should fill the screen similarly to iOS. See attachments", "attachment": [ { "id": "26590", "filename": "droid.png", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-03-25T12:01:41.000+0000", "size": 36350, "mimeType": "image/png" }, { "id": "26591", "filename": "ios.png", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-03-25T12:01:41.000+0000", "size": 22073, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: ScrollView - If a view is added to a scrollview, the view will not fill the screen", "creator": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "SDK build: 2.0.0.v20120323221800\r\nRuntime: v8, rhino\r\nTitanium Studio, build: 2.0.0.201203221554\r\nDevice: Galaxy Nexus (4.0.2)", "comment": { "comments": [ { "id": "188520", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "After further investigation, this bug could be related to the layout feature. \r\n\r\nIn the previous sample code, it did not contain the postlayout event which will display the ScrollView's height and width = 0. \r\n\r\nNow, the current sample code contains the postlayout event which properly displays the ScrollView's height and width.", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-03-25T12:07:53.000+0000", "updated": "2012-03-25T12:07:53.000+0000" }, { "id": "188601", "author": { "name": "tsmolich", "key": "tsmolich", "displayName": "Tamila Smolich", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Also occurs on:\r\nTitanium Studio, build: 2.0.0.201203262445\r\nSDK: 2.0.0.v20120325213306\r\nAndroid Nexus S (2.3.6)", "updateAuthor": { "name": "tsmolich", "key": "tsmolich", "displayName": "Tamila Smolich", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-26T10:42:05.000+0000", "updated": "2012-03-26T10:43:46.000+0000" }, { "id": "188602", "author": { "name": "sshylaja", "key": "sshylaja", "displayName": "Sitara Shylaja", "active": true, "timeZone": "America/Los_Angeles" }, "body": "\r\nThis also occurs on Android(2.2.2) Nexus one when tested on\r\nTitanium mobilesdk-2.0.0.v20120325213306\r\nTitanium Studio build: 2.0.0.201203262445", "updateAuthor": { "name": "sshylaja", "key": "sshylaja", "displayName": "Sitara Shylaja", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-26T10:42:12.000+0000", "updated": "2012-03-26T10:43:45.000+0000" }, { "id": "188612", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Also occurs on Kindle Fire and Nook Color\r\nTitanium SDK: 2.0.0.v20120325213306\r\nTitanium Studio, build: 2.0.0.201203262445", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-26T11:00:21.000+0000", "updated": "2012-03-26T11:00:21.000+0000" }, { "id": "199939", "author": { "name": "sguduru", "key": "sguduru", "displayName": "Smitha Guduru", "active": true, "timeZone": "America/Los_Angeles" }, "body": "A red view appears on the screen.\r\n\r\nVerified on\r\nTitanium Studio, build: 2.2.0.201206222035\r\nTitanium SDK: 2.1.0.v20120622174154\r\nDevice:Xoom(4.0.3)", "updateAuthor": { "name": "sguduru", "key": "sguduru", "displayName": "Smitha Guduru", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-23T15:01:53.000+0000", "updated": "2012-06-23T15:01:53.000+0000" }, { "id": "202892", "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-12T04:16:02.000+0000", "updated": "2012-07-12T04:16:02.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }