{ "id": "122867", "key": "TIMOB-15810", "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": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2013-11-25T22:58:25.000+0000", "created": "2013-11-25T11:19:29.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "qe-3.2.0" ], "versions": [ { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [ { "id": "33371", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "89490", "key": "TIMOB-8518", "fields": { "summary": "Android: ImageView does not handle width or height set to Ti.UI.FILL correctly", "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": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-21T23:09:35.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": "Android: Media: ImageView is not setting the captured image. \r\nImage is successfully getting saved to gallery. \r\nThis is regression, it works fine on SDK: 3.1.3.GA\r\n\r\nSteps to reproduce:\r\n1. Run the App below.\r\n{code}\r\n\r\n\r\n //\r\n\t//TIMOB-8518 ImageView does not handle width or height set to Ti.UI.FILL correctly\r\n\t//\r\n\r\nvar win = Titanium.UI.createWindow({backgroundColor:'white'});\r\nwin.open();\r\n\r\nTitanium.Media.showCamera({\r\n \r\n success:function(event)\r\n {\r\n var cropRect = event.cropRect;\r\n var image = event.media;\r\n \t\tTi.API.info(\"Height : \"+ image.height);\r\n \t\tTi.API.info(\"Width : \"+ image.width);\r\n Ti.API.debug('Our type was: '+event.mediaType);\r\n \r\n if(event.mediaType == Ti.Media.MEDIA_TYPE_PHOTO)\r\n {\r\n var imageView = Ti.UI.createImageView({\r\n width:Ti.UI.FILL,\r\n height:Ti.UI.FILL,\r\n image:KS_nav_ui.png\r\n });\r\n Ti.API.info(\"ImageView Object : \"+ imageView);\r\n win.add(imageView);\r\n }\r\n else\r\n {\r\n alert(\"got the wrong type back =\"+event.mediaType);\r\n }\r\n },\r\n cancel:function()\r\n {\r\n },\r\n error:function(error)\r\n {\r\n // create alert\r\n var a = Titanium.UI.createAlertDialog({title:'Camera'});\r\n \r\n // set message\r\n if (error.code == Titanium.Media.NO_CAMERA)\r\n {\r\n a.setMessage('Please run this test on device');\r\n }\r\n else\r\n {\r\n a.setMessage('Unexpected error: ' + error.code);\r\n }\r\n \r\n // show alert\r\n a.show();\r\n },\r\n saveToPhotoGallery:true,\r\n allowEditing:true,\r\n mediaTypes:[Ti.Media.MEDIA_TYPE_VIDEO,Ti.Media.MEDIA_TYPE_PHOTO]\r\n});\r\n\r\n{code}\r\n\r\n2. Take the picture and save it.\r\n\r\nExpected:\r\nYou should see the image in the next screen (a newly created image view)\r\n\r\nActual:\r\nA blank ImageView is displayed.", "attachment": [], "flagged": false, "summary": "Android: Media: ImageView is not setting the captured image", "creator": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "subtasks": [], "reporter": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "environment": "Tested on:\r\nDevice : Google Nexus 7, Android Version: 4.2.1\r\nSDK: 3.2.0.v20131122172908\r\nCLI version : 3.2.0-alpha\r\nOS : MAC OSX 10.9\r\n1.3.0-alpha6\r\nAppcelerator Studio, build: 3.2.0.201311221207\r\nXCode : 5.0.2", "comment": { "comments": [ { "id": "281269", "author": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "body": "The code above has the image property of the imageView set to \"image:KS_nav_ui.png\" rather than \"event.media\" which is wrong.\r\n\r\nThis is a duplicate of TIMOB-8518. I am able to repro the issue in TIMOB-8518 when the width & height of the imageView is set to \"Ti.UI.FILL\" and reopening it.\r\n\r\nThere is a similar test in \"KS/phone/camera/camerabasic\" in which the width & height of the imageView is set to \"win.height\" & \"win.width\".It works without any issues & I can see the captured image in the imageView.\r\n\r\nEnvironment:\r\nAppcel Studio : 3.2.0.201311221207\r\nTi SDK : 3.2.0.v20131122172908\r\nMac OSX : 10.8.5\r\nAlloy : 1.3.0-alpha6\r\nCLI - 3.2.0-alpha\r\nNexus 5 - android 4.4\r\nDevice: Samsung Galaxy S4 running android 4.2.2\r\n\r\n ", "updateAuthor": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-11-25T22:49:07.000+0000", "updated": "2013-11-25T22:49:55.000+0000" }, { "id": "281277", "author": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-11-25T22:58:25.000+0000", "updated": "2013-11-25T22:58:25.000+0000" }, { "id": "414659", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as duplicate with reference to the above comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-21T23:09:35.000+0000", "updated": "2017-03-21T23:09:35.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }