{ "id": "171019", "key": "AC-5565", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2018-03-15T22:17:44.000+0000", "created": "2018-02-02T13:00:35.000+0000", "labels": [], "versions": [ { "id": "17038", "name": "Appcelerator Studio 4.5.0", "archived": false, "released": false } ], "issuelinks": [ { "id": "56295", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "171033", "key": "TIMOB-25753", "fields": { "summary": "Android: ScrollView \"width\" ignores Ti.UI.SIZE as of 6.3.0", "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": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2018-05-08T18:12: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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "Ti.UI.SIZE not working in Scroll View on Android after SDK onward 6.3.0 GA. \r\n\r\nAdded label in scroll view and apply property of Ti.UI.SIZE to scroll view but it not taking it as size and it get's FILL across the screen. \r\n", "attachment": [ { "id": "64804", "filename": "Screen Shot 2018-02-05 at 11.48.55 AM.png", "author": { "name": "bpawar", "key": "bpawar", "displayName": "Bhushankumar pawar", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-05T06:23:49.000+0000", "size": 83805, "mimeType": "image/png" } ], "flagged": false, "summary": "Ti.UI.SIZE not working in Scroll View on Andorid ", "creator": { "name": "bpawar", "key": "bpawar", "displayName": "Bhushankumar pawar", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "bpawar", "key": "bpawar", "displayName": "Bhushankumar pawar", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "SDK 6.3.0 GA \r\n", "comment": { "comments": [ { "id": "433984", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~bpawar], can you provide more details please? And test code to reproduce it?\r\n\r\nBecause I can't reproduce this issue. The following code does a Ti.UI.SIZE on a label within a ScrollView and it does correctly size the label to just-fit the text. Note that the below shows a blue background for the label so that you can easily see it's actual width and height.\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//\tlayout: \"composite\",\r\n\tshowHorizontalScrollIndicator: false,\r\n\tshorVerticalScrollIndicator: true,\r\n\twidth: Ti.UI.FILL,\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", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-02T21:47:15.000+0000", "updated": "2018-02-02T21:48:05.000+0000" }, { "id": "433990", "author": { "name": "bpawar", "key": "bpawar", "displayName": "Bhushankumar pawar", "active": true, "timeZone": "America/Los_Angeles" }, "body": "If we apply the width: Ti.UI.SIZE, to scroll view then the issue is observed. \r\n\r\nvar window = Ti.UI.createWindow();\r\nvar scrollView = Ti.UI.createScrollView(\r\n{\r\n\tlayout: \"vertical\",\r\n//\tlayout: \"composite\",\r\n\tshowHorizontalScrollIndicator: false,\r\n\tshorVerticalScrollIndicator: true,\r\n\t*{color:#d04437}width: Ti.UI.SIZE,{color}*\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();", "updateAuthor": { "name": "bpawar", "key": "bpawar", "displayName": "Bhushankumar pawar", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-03T05:17:41.000+0000", "updated": "2018-02-03T05:17:41.000+0000" }, { "id": "434004", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello [~bpawar], I am also not able to reproduce the issue with the above sample code you provided. I also get the label with a blue background as the sample code by [~jquick], Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2018-02-03T21:41:14.000+0000", "updated": "2018-02-03T21:41:14.000+0000" }, { "id": "434029", "author": { "name": "bpawar", "key": "bpawar", "displayName": "Bhushankumar pawar", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thanks Sharif, Can you please check below code snippet. \r\n Here we can observe that scrollView(yellow background) is filling all window for android\r\nfor iOS it is working fine.\r\nPFA.\r\n !Screen Shot 2018-02-05 at 11.48.55 AM.png|thumbnail! \r\n\r\nvar window = Ti.UI.createWindow();\r\nvar scrollView = Ti.UI.createScrollView(\r\n{\r\n\tlayout: \"horizontal\",\r\n//\tlayout: \"composite\",\r\nshowHorizontalScrollIndicator: false,\r\nshorVerticalScrollIndicator: true,\r\nwidth: Ti.UI.SIZE,\r\nheight: Ti.UI.FILL,\r\nbackgroundColor: \"yellow\",\r\nheight : \"40dp\"\r\n});\r\nscrollView.add(Ti.UI.createLabel(\r\n\r\n{ text: \"Hello World\", color: \"white\", backgroundColor: \"blue\", width: Ti.UI.SIZE, height: Ti.UI.SIZE, }\r\n));\r\nwindow.add(scrollView);\r\nwindow.open();", "updateAuthor": { "name": "bpawar", "key": "bpawar", "displayName": "Bhushankumar pawar", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-05T06:23:57.000+0000", "updated": "2018-02-05T06:23:57.000+0000" }, { "id": "434058", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~bpawar], I'm able to reproduce it now. Thanks.\r\n\r\nRight, the issue is that the ScrollView width ignores Ti.UI.SIZE and does a FILL instead.\r\nThis issue was introduced when we added \"RefreshControl\" support to ScrollView.\r\n\r\nIt's technically a bug on Google's end where their Java \"SwipeRefreshLayout\" class ignores the \"WRAP_CONTENT\" setting, which is the Android equivalent of our Ti.UI.SIZE setting. We'll have to work-around this issue and calculate it ourselves.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-05T18:45:14.000+0000", "updated": "2018-02-05T18:45:14.000+0000" }, { "id": "434060", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I've written up a bug report for it here: [TIMOB-25753]", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-05T19:06:14.000+0000", "updated": "2018-02-05T19:06:14.000+0000" }, { "id": "435661", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Waiting for the fix on 7.1.1 release. ", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2018-03-15T22:17:27.000+0000", "updated": "2018-03-15T22:17:27.000+0000" }, { "id": "437472", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This issue was fixed in Titanium 7.1.1 which is available today.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-05-08T18:12:35.000+0000", "updated": "2018-05-08T18:12:35.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }