{ "id": "174241", "key": "TIMOB-27461", "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": [], "resolution": { "id": "10100", "description": "This issue won't be actioned.", "name": "Won't Do" }, "resolutiondate": "2019-11-01T18:12:51.000+0000", "created": "2019-10-10T10:09:48.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [ "ACF" ], "versions": [ { "id": "20827", "name": "Release 8.2.0", "archived": false, "released": true, "releaseDate": "2019-09-19" } ], "issuelinks": [], "assignee": null, "updated": "2019-11-01T18:12:51.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": "The customer has a requirement where they need to display an image inside a scrollview and provide zoom controls for that image. But they are able to see the extra spacing at top and bottom of the image. If the \"enableZoomControls\" is set to false, image displayed properly without any extra spaces. Currently they are using 8.0.2.GA SDK. \r\nNote: We tested the issue on 8.2.0.GA, Huawei Gr3 2017(Android 7) and the issue is reproduced on our end.\r\n\r\n\r\n*Test steps:*\r\n\r\n* Create a classic project\r\n* Download the image file and paste it on resources\r\n* Paste the sample code to app.js\r\n* Run the project on device. After running, we are able to see the extra spacing at top and bottom of the image.\r\n\r\n*Test Code:*\r\n\r\n{code}\r\n\r\nvar win = Ti.UI.createWindow({\r\n\r\n backgroundColor: '#fff',\r\n\r\n layout : 'vertical'\r\n\r\n });\r\n\r\n var scrollView = Ti.UI.createScrollView({\r\n\r\n layout : 'vertical',\r\n\r\n width : Ti.UI.FILL,\r\n\r\ncontentWidth : '100%',\r\n\r\nheight : Ti.UI.FILL\r\n\r\n });\r\n\r\n var imageViewContainer = Ti.UI.createView({\r\n\r\nheight : Ti.UI.SIZE,\r\n\r\nwidth : Ti.UI.SIZE,\r\n\r\n});\r\n\r\n var file = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory,'test.png');\r\n\r\n imageViewContainer.add(Ti.UI.createImageView({\r\n\r\n image : file,\r\n\r\n width:Ti.UI.SIZE,\r\n\r\n height:Ti.UI.SIZE,\r\n\r\n enableZoomControls : true,\r\n\r\n borderColor:'red'\r\n\r\n }));\r\n\r\n scrollView.add(imageViewContainer);\r\n\r\nwin.add(scrollView);\r\n\r\nwin.open();\r\n\r\n{code}\r\n\r\n*Test Output:*\r\n\"enableZoomControls\" is true:\r\n !Screenshot_20191010-155604.png|thumbnail! \r\n\r\n\r\n\"enableZoomControls\" is false:\r\n !Screenshot_20191010-155205.png|thumbnail! ", "attachment": [ { "id": "67045", "filename": "after_scroll_nexus.png", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-10-10T10:25:26.000+0000", "size": 261493, "mimeType": "image/png" }, { "id": "67048", "filename": "after_scroll_pixel.png", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-10-10T10:27:53.000+0000", "size": 207418, "mimeType": "image/png" }, { "id": "67047", "filename": "before_scroll_nexus (1).png", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-10-10T10:26:53.000+0000", "size": 255145, "mimeType": "image/png" }, { "id": "67046", "filename": "before_scroll_pixel.png", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-10-10T10:26:05.000+0000", "size": 725807, "mimeType": "image/png" }, { "id": "67044", "filename": "Screenshot_20191010-155205.png", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-10-10T10:10:58.000+0000", "size": 227835, "mimeType": "image/png" }, { "id": "67043", "filename": "Screenshot_20191010-155604.png", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-10-10T10:10:45.000+0000", "size": 232119, "mimeType": "image/png" }, { "id": "67050", "filename": "test.png", "author": { "name": "jnaher", "key": "jnaher", "displayName": "Jebun Naher", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2019-10-11T04:17:29.000+0000", "size": 313098, "mimeType": "image/png" } ], "flagged": false, "summary": "Android:Extra padding if enableZoomControl is true for imageView on 8.2.0.GA", "creator": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "Appcelerator Command-Line Interface, version 7.1.1\r\nCopyright (c) 2014-2019, Appcelerator, Inc. All Rights Reserved.\r\n\r\n[WARN] DEPRECATION NOTICE: Titanium SDK 9 will no longer support Node.js 8 or lower. We intend to support Node.js 10/1\r\n2 LTS, which will be 10.13 or higher.\r\n\r\n2019-10-10 15:52:55\r\n\r\nOperating System\r\n Name = Mac OS X\r\n Version = 10.14.6\r\n Architecture = 64bit\r\n # CPUs = 4\r\n Memory = 8589934592\r\n\r\nNode.js\r\n Node.js Version = 8.9.4\r\n npm Version = 5.6.0\r\nTitanium CLI\r\n CLI Version = 5.2.1\r\n\r\nTitanium SDK\r\n SDK Version = 8.2.0.GA\r\n", "comment": { "comments": [ { "id": "451965", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I think they are after pinch zoom and the ability to scroll both horizontally and vertically, correct?\r\n\r\nUnfortunately, Titanium's {{ScrollView}} does not support this on Android, because it's not supported natively on Google's end. It requires a custom view.\r\n\r\nThat said, there is a 3rd party module which does support this. See the module below. The Titanium community frequently uses this. But I do believe you have to build the module yourself.\r\nhttps://github.com/iotashan/TiTouchImageView\r\n", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-10-10T18:35:08.000+0000", "updated": "2019-10-10T18:35:08.000+0000" }, { "id": "451999", "author": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~jnaher] Please update us with the customer feedback, if they were indeed after pinch zoom and the ability to scroll both horizontally and vertically.", "updateAuthor": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-10-11T20:15:55.000+0000", "updated": "2019-10-13T00:18:23.000+0000" }, { "id": "452135", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Hello,\r\nThe customer is informed about the updates. Waiting for his feedback.", "updateAuthor": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-10-18T04:46:02.000+0000", "updated": "2019-10-18T04:46:02.000+0000" }, { "id": "452425", "author": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing per dev comments and removal of the code from the customer.", "updateAuthor": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-11-01T18:12:51.000+0000", "updated": "2019-11-01T18:12:51.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }