{ "id": "98908", "key": "TIMOB-10358", "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": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "15276", "description": "2013 Sprint 05 Core", "name": "2013 Sprint 05 Core", "archived": true, "released": true, "releaseDate": "2013-03-11" }, { "id": "14815", "description": "2013 Sprint 05", "name": "2013 Sprint 05", "archived": true, "released": true, "releaseDate": "2013-03-11" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-03-07T18:52:35.000+0000", "created": "2012-08-08T16:38:04.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "core", "layout", "module_imageview", "parity", "qe-testadded" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13572", "description": "Release 2.1.1", "name": "Release 2.1.1", "archived": true, "released": true, "releaseDate": "2012-07-31" } ], "issuelinks": [ { "id": "19769", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "64827", "key": "TIMOB-3749", "fields": { "summary": "iOS: ImageView with scaled image, auto leaves padding", "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": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "19940", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "99171", "key": "AC-1927", "fields": { "summary": "[ios] imageview: resizing with Ti.UI.SIZE when image size ratio != 1", "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 } } } }, { "id": "26152", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "110287", "key": "TIMOB-12880", "fields": { "summary": "Android: ImageView parity on Android, not rendering the image as expected ", "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 } } } }, { "id": "33473", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "122356", "key": "TIMOB-15747", "fields": { "summary": "Android: Images do not scale UP properly on Android (parity issue)", "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": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-12-03T18:58:33.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": "While testing for parity on current scaling behavior of imageViews on Android, noticed all kinds of layout issues. Basically if an image is loaded with auto width and height and then the width and height properties are specifically overwritten, setting the width and height back to auto does not return image to original dimensions. Had similar issues with IOS which were fixed as part of TIMOB-3749\r\n\r\nIOS behavior is as follows. If either width or height of image view are set to follow SIZE behavior('auto',Ti.UI.SIZE,undefined) then the image is scaled with aspect ratio intact. Otherwise the image is scaled ignoring aspect ratio.\r\n\r\nTest case is below\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor:'#fff',\r\n layout:'vertical'\r\n});\r\n \r\nvar image = Ti.UI.createImageView({ \r\n image: \"http://www.catravelservices.com/management/hotels/pictures/Mawamba_lodge_nature.jpg\", \r\n backgroundColor : \"red\" \r\n});\r\n \r\n \r\nvar label = Ti.UI.createLabel({\r\n text:'Results Here'\r\n})\r\n \r\nvar updateLabel = function(){\r\n var size = image.size;\r\n label.text = 'ImageView size is '+size.width+'x'+size.height;\r\n}\r\n \r\nvar controlsContainer = Ti.UI.createView({\r\n height:Ti.UI.SIZE\r\n})\r\n \r\nvar widthControls = Ti.UI.createView({\r\n width:'50%',\r\n layout:'vertical',\r\n left:0,\r\n height:Ti.UI.SIZE\r\n})\r\n \r\nvar heightControls = Ti.UI.createView({\r\n width:'50%',\r\n layout:'vertical',\r\n right:0,\r\n height:Ti.UI.SIZE\r\n})\r\n \r\ncontrolsContainer.add(widthControls);\r\ncontrolsContainer.add(heightControls);\r\n \r\nvar b1 = Ti.UI.createButton({title:'WIDTH=SIZE'})\r\nvar b2 = Ti.UI.createButton({title:'WIDTH=165'})\r\nvar b3 = Ti.UI.createButton({title:'WIDTH=250'})\r\nvar b4 = Ti.UI.createButton({title:'HEIGHT=SIZE'})\r\nvar b5 = Ti.UI.createButton({title:'HEIGHT=50'})\r\nvar b6 = Ti.UI.createButton({title:'HEIGHT=165'})\r\nb1.addEventListener('click',function(e){\r\n image.width=Ti.UI.SIZE;\r\n setTimeout(updateLabel,500);\r\n})\r\nb2.addEventListener('click',function(e){\r\n image.width=165;\r\n setTimeout(updateLabel,500);\r\n})\r\nb3.addEventListener('click',function(e){\r\n image.width=250;\r\n setTimeout(updateLabel,500);\r\n})\r\nb4.addEventListener('click',function(e){\r\n image.height=Ti.UI.SIZE;\r\n setTimeout(updateLabel,500);\r\n})\r\nb5.addEventListener('click',function(e){\r\n image.height=50;\r\n setTimeout(updateLabel,500);\r\n})\r\nb6.addEventListener('click',function(e){\r\n image.height=165;\r\n setTimeout(updateLabel,500);\r\n})\r\nwin.add(image);\r\nwidthControls.add(b1);\r\nwidthControls.add(b2);\r\nwidthControls.add(b3);\r\nheightControls.add(b4);\r\nheightControls.add(b5);\r\nheightControls.add(b6);\r\nwin.add(controlsContainer);\r\nwin.add(label)\r\nwin.open();\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "Android: ImageView parity for scaling behavior", "creator": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 3, "state": "closed", "name": "Release 3.0.0", "startDate": "2012-09-27T05:26:46.636Z", "endDate": "2012-10-08T20:05:00.000Z", "completeDate": "2012-12-20T17:03:19.403Z" } ], "comment": { "comments": [ { "id": "240840", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "https://github.com/appcelerator/titanium_mobile/pull/3937", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-06T00:03:38.000+0000", "updated": "2013-03-06T00:03:38.000+0000" }, { "id": "241724", "author": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Environment used for verification -\r\nTitanium SDK: 3.1.0.v20130311192922\r\nTitanium  Studio:3.0.2.201302151605\r\nDevice: Samung GALAXY Tab 620 Android 3.2", "updateAuthor": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-12T10:31:11.000+0000", "updated": "2013-03-12T10:31:11.000+0000" }, { "id": "258059", "author": { "name": "doublerebel", "key": "doublerebel", "displayName": "Charles Phillips", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The fix for this issue causes a regression, images do not scale proportionally to fill the element in width or height (as iOS does) if the element dimensions are larger than the image native dimensions.\r\n\r\nDiscussion here:\r\nhttp://developer.appcelerator.com/question/151081/android-sdk-31-imageviews-dont-stretch-and-keep-ratio-anymore#comment-177858", "updateAuthor": { "name": "doublerebel", "key": "doublerebel", "displayName": "Charles Phillips", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-15T00:13:35.000+0000", "updated": "2013-06-15T00:13:35.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }