{ "id": "99171", "key": "AC-1927", "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": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2012-08-15T12:41:12.000+0000", "created": "2012-08-14T07:45:02.000+0000", "labels": [ "autosize", "imageview" ], "versions": [], "issuelinks": [ { "id": "19940", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "98908", "key": "TIMOB-10358", "fields": { "summary": "Android: ImageView parity for scaling behavior", "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": "19939", "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 } } } } ], "assignee": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "updated": "2016-03-08T07:40: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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "If you fix only height(or width), and rely on Ti.UI.SIZE for the other. Then you will end up with an imageView of height you wanted but of the width of the source image.\r\n\r\n{code}\r\nvar win = Titanium.UI.currentWindow;\r\n\r\nvar imageView = Titanium.UI.createImageView({\r\n\ttop:50,\r\n\tleft:10,\r\n\theight:40,\r\n\tbackgroundColor:'red',\r\n\twidth:Ti.UI.SIZE\r\n});\r\nwin.add(imageView);\r\n\r\nvar xhr = Titanium.Network.createHTTPClient();\r\n\r\nxhr.onload = function()\r\n{\r\n\timageView.image = this.responseData;\r\n};\r\nxhr.open('GET','http://www.maclife.com/files/u53/clouds.jpg');\r\n\r\nxhr.send();\r\n\r\n{code}\r\n\r\npull request coming", "attachment": [], "flagged": false, "summary": "[ios] imageview: resizing with Ti.UI.SIZE when image size ratio != 1", "creator": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "environment": "Titanium 2.2.0 (master)\r\nios 5.1", "comment": { "comments": [ { "id": "214295", "author": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "body": "pull request https://github.com/appcelerator/titanium_mobile/pull/2739\r\n", "updateAuthor": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "created": "2012-08-14T07:47:22.000+0000", "updated": "2012-08-14T07:47:22.000+0000" }, { "id": "214621", "author": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Implementing requested behavior will break existing [layout specification| http://docs.appcelerator.com/titanium/2.1/index.html#!/guide/UI_Composite_Layout_Behavior_Spec].\r\nAccording to \"Precedence of layoutParams\" section, width always has precedence other any other layout values.\r\n", "updateAuthor": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-15T12:41:12.000+0000", "updated": "2012-08-15T12:41:12.000+0000" }, { "id": "214738", "author": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "body": "You are right. Are you ok if i add a test\r\n{code}\r\nif (TiDimensionIsAuto(width) || TiDimensionIsAutoSize(width))\r\n{code}\r\nCause in that case (which was my case), it should do that.\r\n", "updateAuthor": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "created": "2012-08-15T23:45:19.000+0000", "updated": "2012-08-15T23:45:34.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }