{ "id": "171033", "key": "TIMOB-25753", "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": "20102", "name": "Release 7.1.1", "archived": false, "released": true, "releaseDate": "2018-05-02" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-03-21T17:41:46.000+0000", "created": "2018-02-05T18:59:39.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "ScrollView", "android" ], "versions": [ { "id": "19906", "description": "", "name": "Release 6.3.0", "archived": false, "released": true, "releaseDate": "2017-11-01" } ], "issuelinks": [ { "id": "56295", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "171019", "key": "AC-5565", "fields": { "summary": "Ti.UI.SIZE not working in Scroll View on Andorid ", "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" } }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-03-23T11:42:48.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\nSetting the ScrollView \"width\" property to \"Ti.UI.SIZE\" will do a \"Ti.UI.FiLL\" instead as of Titanium 6.3.0.\r\n_(This is not an issue with the \"height\" property. Only the \"width\".)_\r\n\r\n*Code to Reproduce:*\r\n{code:javascript}\r\nvar window = Ti.UI.createWindow();\r\nvar scrollView = Ti.UI.createScrollView(\r\n{\r\n\tlayout: \"vertical\",\r\n\tshowHorizontalScrollIndicator: false,\r\n\tshorVerticalScrollIndicator: true,\r\n\tbackgroundColor: \"yellow\",\r\n\twidth: Ti.UI.SIZE,\r\n\theight: Ti.UI.FILL,\r\n});\r\nscrollView.add(Ti.UI.createLabel(\r\n{\r\n\ttext: \"Hello World\",\r\n\tcolor: \"white\",\r\n\tbackgroundColor: \"blue\",\r\n\twidth: Ti.UI.SIZE,\r\n\theight: Ti.UI.SIZE,\r\n}));\r\nwindow.add(scrollView);\r\nwindow.open();\r\n{code}\r\n\r\n*Result:*\r\nThe above code produces a yellow ScrollView. Note that the ScrollView does not auto-size itself to just fit the \"Hello World\" label as seen in \"Screenshot-Bad.png\".\r\n\r\n*Expected Result:*\r\nThe ScrollView width should auto-size itself to fit the label as shown in \"Screenshot-Good.png\". This is how it worked in Titanium 6.2.2 and older versions.\r\n\r\n*Cause:*\r\nThis bug happened when we added \"RefreshControl\" support. Google's Java \"SwipeRefreshLayout\" class does not support the \"WRAP_CONTENT\" setting.\r\n\r\n*Recommended Solution:*\r\nModify Titanium's Java \"TiSwipeRefreshLayout\" onMeasure() method to handle the \"WRAP_CONTENT\" setting ourselves. We're already doing this in the vertical direction and we need to do the same for the horizontal.\r\nhttps://github.com/appcelerator/titanium_mobile/blob/master/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiSwipeRefreshLayout.java#L76\r\n", "attachment": [ { "id": "64808", "filename": "Screenshot-Bad.png", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-05T18:53:55.000+0000", "size": 42170, "mimeType": "image/png" }, { "id": "64807", "filename": "Screenshot-Good.png", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-05T18:53:59.000+0000", "size": 56232, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: ScrollView \"width\" ignores Ti.UI.SIZE as of 6.3.0", "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": 1008, "state": "closed", "name": "2018 Sprint 06 SDK", "startDate": "2018-03-11T22:18:04.396Z", "endDate": "2018-03-25T22:18:00.000Z", "completeDate": "2018-03-25T21:52:36.683Z", "originBoardId": 216 } ], "comment": { "comments": [ { "id": "435030", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/9895\r\nPR (7.1.x): https://github.com/appcelerator/titanium_mobile/pull/9896", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-28T21:47:07.000+0000", "updated": "2018-02-28T21:47:07.000+0000" }, { "id": "435780", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Master FR passed.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-03-20T22:20:56.000+0000", "updated": "2018-03-20T22:20:56.000+0000" }, { "id": "435807", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed.\r\nPR's merged.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-03-21T17:41:40.000+0000", "updated": "2018-03-21T17:41:40.000+0000" }, { "id": "435861", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified in SDK Version 7.1.1.v20180322144031 and 7.2.0.v20180322112525.\r\n\r\nTest and other information can be found at:\r\n7_1_X: https://github.com/appcelerator/titanium_mobile/pull/9896\r\nMaster: https://github.com/appcelerator/titanium_mobile/pull/9895", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-03-23T11:42:37.000+0000", "updated": "2018-03-23T11:42:37.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }