{ "id": "169974", "key": "TIMOB-25377", "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": "19906", "description": "", "name": "Release 6.3.0", "archived": false, "released": true, "releaseDate": "2017-11-01" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-10-11T23:56:44.000+0000", "created": "2017-10-09T17:00:08.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "scrollview" ], "versions": [], "issuelinks": [], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-10-23T21:07:19.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": "*Summary:*\r\nOn Android, child views that use percent values for their size/positional properties (ex: width, height, top, bottom, etc.) are relative to the size of the scrollable content area when they should be relative to the ScrollView container instead, like iOS.\r\n\r\nThe main issue with this is that as the content area grows in size (say vertically as you add more views), the percentage based properties such as \"height\" grow as well. This makes it difficult for developers to display child views that 100% fill the ScrollView container to create their own paginated like view.\r\n\r\n*Steps to Reproduce:*\r\n\r\n# Run the below code on Android.\r\n# Verify that the green \"50%\" view fills half the window vertically.\r\n# Scroll all the way to the bottom.\r\n# Verify that the blue \"100%\" view completely fills the window.\r\n\r\n*Test Code:*\r\n\r\n{code:javascript}\r\nvar window = Ti.UI.createWindow();\r\nvar scrollView = Ti.UI.createScrollView(\r\n{\r\n\tlayout: \"vertical\",\r\n\tscrollType: \"vertical\",\r\n\tshowHorizontalScrollIndicator: false,\r\n\tshorVerticalScrollIndicator: true,\r\n\twidth: Ti.UI.FILL,\r\n\theight: Ti.UI.FILL,\r\n//height: \"50%\", top: 0,\r\n//contentHeight: 5000,\r\n});\r\nscrollView.add(Ti.UI.createLabel(\r\n{\r\n\ttext: \"50%\",\r\n\ttextAlign: Ti.UI.TEXT_ALIGNMENT_CENTER,\r\n\tcolor: \"white\",\r\n\tbackgroundColor: \"#008800\",\r\n\tborderColor: \"white\",\r\n\tborderWidth: \"1dp\",\r\n\twidth: Ti.UI.FILL,\r\n\theight: \"50%\",\r\n}));\r\nscrollView.add(Ti.UI.createView(\r\n{\r\n\twidth: Ti.UI.FILL,\r\n\theight: \"1dp\",\r\n\tbackgroundColor: \"black\",\r\n}));\r\nscrollView.add(Ti.UI.createLabel(\r\n{\r\n\ttext: \"100%\",\r\n\ttextAlign: Ti.UI.TEXT_ALIGNMENT_CENTER,\r\n\tcolor: \"white\",\r\n\tbackgroundColor: \"blue\",\r\n\tborderColor: \"white\",\r\n\tborderWidth: \"1dp\",\r\n\twidth: Ti.UI.FILL,\r\n\theight: \"100%\",\r\n}));\r\nwindow.add(scrollView);\r\nwindow.open();\r\n{code}\r\n\r\n\r\n", "attachment": [ { "id": "63400", "filename": "Android-Bad.png", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-10-09T17:04:31.000+0000", "size": 26731, "mimeType": "image/png" }, { "id": "63398", "filename": "Android-Good1.png", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-10-09T17:04:31.000+0000", "size": 27635, "mimeType": "image/png" }, { "id": "63399", "filename": "Android-Good2.png", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-10-09T17:04:31.000+0000", "size": 26514, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: ScrollView child percent size should be relative to container size", "creator": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 951, "state": "closed", "name": "2017 Sprint 20 SDK", "startDate": "2017-09-24T17:50:18.277Z", "endDate": "2017-10-08T17:50:00.000Z", "completeDate": "2017-10-09T20:38:07.840Z", "originBoardId": 114 }, { "id": 959, "state": "closed", "name": "2017 Sprint 21 SDK", "startDate": "2017-10-08T20:38:15.130Z", "endDate": "2017-10-22T20:38:00.000Z", "completeDate": "2017-10-24T23:55:56.605Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "428854", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/9513", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-10-09T21:20:59.000+0000", "updated": "2017-10-09T21:20:59.000+0000" }, { "id": "428903", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed for master.\r\nWaiting for backport.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-10-10T19:24:30.000+0000", "updated": "2017-10-10T19:24:30.000+0000" }, { "id": "428983", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (6.3.x): https://github.com/appcelerator/titanium_mobile/pull/9521", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-10-11T23:27:25.000+0000", "updated": "2017-10-11T23:27:25.000+0000" }, { "id": "428990", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR passed for backport. PR merged.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-10-11T23:54:44.000+0000", "updated": "2017-10-11T23:54:44.000+0000" }, { "id": "429456", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix in SDK 7.0.0.v20171023120246 & 6.3.0.v20171018084007.\r\n\r\nClosing.\r\n\r\nStudio Ver: 4.10.0.201709271713\r\nOS Ver: 10.12.3\r\nXcode Ver: Xcode 8.3.3\r\nAppc NPM: 4.2.10-2\r\nAppc CLI: 6.3.0-master.15\r\nTi CLI Ver: 5.0.14\r\nAlloy Ver: 1.10.6\r\nNode Ver: 7.10.1\r\nJava Ver: 1.8.0_101\r\nDevices: ⇨ google Nexus 5 — Android 6.0.1\r\n⇨ google Pixel — Android 7.1.1", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-10-23T21:07:02.000+0000", "updated": "2017-10-23T21:07:02.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }