{ "id": "129543", "key": "TIMOB-16878", "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": "20115", "name": "Release 7.3.0", "archived": false, "released": true, "releaseDate": "2018-08-17" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-07-09T23:25:15.000+0000", "created": "2014-04-22T09:41:41.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "parity", "scrollableview" ], "versions": [ { "id": "15857", "description": "Release 3.2.2", "name": "Release 3.2.2", "archived": false, "released": true, "releaseDate": "2014-03-09" } ], "issuelinks": [ { "id": "56226", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "154841", "key": "TIMOB-20388", "fields": { "summary": "Android: Scrollable view height issue in android", "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": "39713", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "134459", "key": "AC-1119", "fields": { "summary": "Android: ScrollableView with height: Ti.UI.SIZE does not work", "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-07-09T23:25: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": "I created a parent view as ScrollableView and gave its width and height as Ti.UI.FILL.\r\nThen I created child view giving its width and height as 80%.\r\n\r\nIn iOS simulator I get the expected result, but in android device child view takes the whole view\r\n\r\nIn the attachment I have added my code and also the screenshot from iOS simulator and android device.", "attachment": [ { "id": "47640", "filename": "android device.png", "author": { "name": "himanshujusta", "key": "himanshujusta", "displayName": "Himanshu Justa", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-04-22T09:41:41.000+0000", "size": 47491, "mimeType": "image/png" }, { "id": "47639", "filename": "iOS Simulator Screen shot 19-Apr-2014 12.42.29 AM.png", "author": { "name": "himanshujusta", "key": "himanshujusta", "displayName": "Himanshu Justa", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-04-22T09:41:41.000+0000", "size": 13318, "mimeType": "image/png" }, { "id": "60598", "filename": "Screenshot_1477320271.png", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-10-24T14:44:49.000+0000", "size": 25184, "mimeType": "image/png" }, { "id": "47636", "filename": "TestProjectJS", "author": { "name": "himanshujusta", "key": "himanshujusta", "displayName": "Himanshu Justa", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-04-22T09:41:41.000+0000", "size": 25, "mimeType": "text/html" }, { "id": "47637", "filename": "TestProjectTss", "author": { "name": "himanshujusta", "key": "himanshujusta", "displayName": "Himanshu Justa", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-04-22T09:41:41.000+0000", "size": 234, "mimeType": "text/html" }, { "id": "47638", "filename": "TestProjectXML", "author": { "name": "himanshujusta", "key": "himanshujusta", "displayName": "Himanshu Justa", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-04-22T09:41:41.000+0000", "size": 419, "mimeType": "text/html" } ], "flagged": false, "summary": "Android: ScrollableView ignores root child view's layout properties", "creator": { "name": "himanshujusta", "key": "himanshujusta", "displayName": "Himanshu Justa", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "himanshujusta", "key": "himanshujusta", "displayName": "Himanshu Justa", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "OS - Windows 7 professional,\r\nandroid device Xperia Z", "closedSprints": [ { "id": 741, "state": "closed", "name": "2016 Sprint 22 SDK", "startDate": "2016-10-22T00:02:29.945Z", "endDate": "2016-11-05T00:02:00.000Z", "completeDate": "2016-11-07T04:38:58.335Z", "originBoardId": 114 }, { "id": 1000, "state": "closed", "name": "2018 Sprint 04 SDK", "startDate": "2018-02-12T04:23:01.913Z", "endDate": "2018-02-26T04:23:00.000Z", "completeDate": "2018-02-26T19:36:01.769Z", "originBoardId": 114 }, { "id": 126, "state": "closed", "name": "2018 Sprint 05 SDK", "startDate": "2018-02-25T19:38:08.926Z", "endDate": "2018-03-11T18:38:00.000Z", "completeDate": "2018-03-11T22:06:01.520Z", "originBoardId": 100 } ], "comment": { "comments": [ { "id": "302054", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~himanshujusta] It appears you copied .tss file as .xml file as well. I can only see .tss and .js files attached. Please provide the xml file to complete the test case.\r\n\r\nindex.js\r\n{code}\r\n$.index.open();\r\n{code}\r\n\r\nindex.tss\r\n{code}\r\n\".container\": {\r\n\tbackgroundColor:\"white\"\r\n},\r\n\"#parentView\": { \r\n\tbackgroundColor:\"black\",\r\n \theight:Ti.UI.FILL,\r\n \twidth:Ti.UI.FILL\r\n },\r\n\"#childView\":{\r\n\tbackgroundColor:\"cyan\", \r\n \theight:\"80%\",\r\n \twidth:\"80%\",\r\n \ttop:\"10%\",\r\n \tleft:\"10%\"\r\n }\r\n{code}\r\n\r\n", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-04-22T17:07:11.000+0000", "updated": "2014-04-23T04:08:57.000+0000" }, { "id": "302156", "author": { "name": "himanshujusta", "key": "himanshujusta", "displayName": "Himanshu Justa", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Following is the xml code.\r\n\r\n{code:xml}\r\n\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n\r\n{code}", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2014-04-23T10:05:57.000+0000", "updated": "2016-03-02T10:23:32.000+0000" }, { "id": "302333", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Moving this ticket to engineering as I can reproduce this issue with Android platform. Works as expected on iOS platform.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-04-24T05:45:59.000+0000", "updated": "2014-04-24T05:45:59.000+0000" }, { "id": "302688", "author": { "name": "himanshujusta", "key": "himanshujusta", "displayName": "Himanshu Justa", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi,\r\nCan someone let me know whats the status the issue.\r\nIm not able to go forward with my work because of this issue.", "updateAuthor": { "name": "himanshujusta", "key": "himanshujusta", "displayName": "Himanshu Justa", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-04-28T11:36:23.000+0000", "updated": "2014-04-28T11:36:23.000+0000" }, { "id": "317891", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "updateAuthor": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2014-08-11T03:12:23.000+0000", "updated": "2014-08-11T03:12:23.000+0000" }, { "id": "320779", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue reproduces\r\n\r\nTitanium SDK version 3.4.0 master, 3.3.0.GA, 3.2.3.GA, 3.2.2.GA\r\nTitanium Studio, build: 3.3.0.201407100905\r\nTitanium Command-Line Interface\r\nCLI version 3.3.0, \r\nAndroid device : Motorola Moto G, Android version : 4.4.4\r\n", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-28T12:18:47.000+0000", "updated": "2014-08-28T12:18:47.000+0000" }, { "id": "378453", "author": { "name": "michaelkaaring", "key": "michaelkaaring", "displayName": "Michael Kåring", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Any followup on this? i have this issue myself now.\r\n\r\nTitanium SDK 5.1.2.GA\r\nAndroid device: Nexus 6P, Android 6.0", "updateAuthor": { "name": "michaelkaaring", "key": "michaelkaaring", "displayName": "Michael Kåring", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-03-02T10:16:37.000+0000", "updated": "2016-03-02T10:16:37.000+0000" }, { "id": "379153", "author": { "name": "michaelkaaring", "key": "michaelkaaring", "displayName": "Michael Kåring", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Is there no easy fix i can do myself? kinda need this fixed", "updateAuthor": { "name": "michaelkaaring", "key": "michaelkaaring", "displayName": "Michael Kåring", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-03-08T10:29:41.000+0000", "updated": "2016-03-08T10:29:41.000+0000" }, { "id": "386620", "author": { "name": "amurcia", "key": "amurcia", "displayName": "Anna", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I have the same problem. I need a solution, please.", "updateAuthor": { "name": "amurcia", "key": "amurcia", "displayName": "Anna", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-05-24T14:23:39.000+0000", "updated": "2016-05-24T14:23:39.000+0000" }, { "id": "388157", "author": { "name": "enzoq", "key": "enzoq", "displayName": "VINCENZO QUACQUARELLI", "active": true, "timeZone": "Europe/Rome" }, "body": "I need a solution too, please!!!", "updateAuthor": { "name": "enzoq", "key": "enzoq", "displayName": "VINCENZO QUACQUARELLI", "active": true, "timeZone": "Europe/Rome" }, "created": "2016-06-12T22:31:25.000+0000", "updated": "2016-06-12T22:31:25.000+0000" }, { "id": "399672", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This seems to be working on *Titanium SDK 6.1.0*\r\n\r\n*TEST CASE*\r\n{code:js}\r\nvar win = Ti.UI.createWindow({backgroundColor: 'grey'}),\r\n scrollableView = Ti.UI.createScrollableView({\r\n backgroundColor: 'cyan',\r\n width: '80%',\r\n height: '80%',\r\n top: '10%',\r\n left: '10%'\r\n });\r\nwin.add(scrollableView);\r\nwin.open();\r\n{code}\r\n\r\n!Screenshot_1477320271.png|thumbnail!", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-10-24T14:45:15.000+0000", "updated": "2016-10-24T14:45:15.000+0000" }, { "id": "399674", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Resolving as invalid.", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-10-24T14:46:04.000+0000", "updated": "2016-10-24T14:46:04.000+0000" }, { "id": "432468", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I have verified that this is indeed a bug on Android. It's an issue with the child views added to the ScrollableView. The top-most child view's width/height/top/bottom/left/right properties are ignored.\r\n\r\n*Reproducible Case:*\r\n\r\nThe below works fine on iOS, but shows the wrong results on Android.\r\n\r\n{code:javascript}\r\nvar window = Ti.UI.createWindow();\r\nvar scrollableView = Ti.UI.createScrollableView(\r\n{\r\n\tviews:\r\n\t[\r\n\t\tTi.UI.createView({ backgroundColor: 'red', width: '80%', height: '80%' }),\r\n\t\tTi.UI.createView({ backgroundColor: 'green', width: '80%', height: '80%' }),\r\n\t\tTi.UI.createView({ backgroundColor: 'blue', width: '80%', height: '80%' }),\r\n\t],\r\n\tshowPagingControl: true,\r\n});\r\nwindow.add(scrollableView);\r\nwindow.open();\r\n{code}\r\n\r\n*Work-Around:*\r\n\r\nThe below works on both Android and iOS. It successfully works-around the issue. Note that the solution is to wrap the view with an empty view.\r\n\r\n{code:javascript}\r\nvar window = Ti.UI.createWindow();\r\nfunction createScrollableChildView(properties) {\r\n\tvar parentView = Ti.UI.createView();\r\n\tparentView.add(Ti.UI.createView(properties));\r\n\treturn parentView;\r\n}\r\nvar scrollableView = Ti.UI.createScrollableView(\r\n{\r\n\tviews:\r\n\t[\r\n\t\tcreateScrollableChildView({ backgroundColor: 'red', width: '80%', height: '80%' }),\r\n\t\tcreateScrollableChildView({ backgroundColor: 'green', width: '80%', height: '80%' }),\r\n\t\tcreateScrollableChildView({ backgroundColor: 'blue', width: '80%', height: '80%' }),\r\n\t],\r\n\tshowPagingControl: true,\r\n});\r\nwindow.add(scrollableView);\r\nwindow.open();\r\n{code}\r\n\r\n*Technical Reason:*\r\nThe Titanium child view is being added directly to Android's native \"ViewPager\", which derives from Android's \"ViewGroup\". The problem with this is that Google's \"ViewGroup\" only supports \"ViewGroup.LayoutParams\", but the Titanium width/height/top/bottom/left/right properties are stored to our custom \"TiCompositeLayout.LayoutParams\" which are ignored by the parent. The parent view must be a Titanium \"TiCompositeLayout\" derived view (all Titanium views derive from this class) in order for these custom parameters to be supported. That's why the above work-around works, because the empty Titanium parent view is needed to size/layout the child based on its custom Titanium parameters.\r\n", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-12-21T04:11:00.000+0000", "updated": "2017-12-21T04:12:30.000+0000" }, { "id": "432534", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/9696", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-12-23T04:16:32.000+0000", "updated": "2017-12-23T04:16:32.000+0000" }, { "id": "437401", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed. Waiting for merger to be enabled.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-05-05T01:11:37.000+0000", "updated": "2018-05-05T01:11:37.000+0000" }, { "id": "437542", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR Merged.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-05-09T21:30:51.000+0000", "updated": "2018-05-09T21:30:51.000+0000" }, { "id": "438739", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "*Closing ticket.* Verified fix can be seen in SDK Version: {{7.3.0.v20180625114905}}\r\n\r\n*Test and other information can be found at:*\r\nhttps://github.com/appcelerator/titanium_mobile/pull/9696", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-06-26T21:29:14.000+0000", "updated": "2018-06-26T21:29:14.000+0000" } ], "maxResults": 18, "total": 18, "startAt": 0 } } }