{ "id": "154233", "key": "TIMOB-20236", "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": "17707", "name": "Release 5.3.0", "archived": false, "released": true, "releaseDate": "2016-06-04" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-02-02T07:53:51.000+0000", "created": "2016-01-12T11:39:57.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "imageView", "qe-5.3.0", "windows", "windows_phone" ], "versions": [ { "id": "17072", "name": "Release 5.1.2", "archived": false, "released": true, "releaseDate": "2016-01-12" } ], "issuelinks": [], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-04-14T19:54:50.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": "12642", "name": "Windows", "description": "Windows authoring support" } ], "description": "I create a simple alloy app and I download some remote image with this function \r\n\r\n{code:javascript}\r\nvar dir = Titanium.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory,'myAppDir');\r\ndir.createDirectory(); // this creates the directory\r\nAlloy.Globals.directory = Ti.Filesystem.applicationDataDirectory + \"myAppDir/\";\r\nvar dirCat = Titanium.Filesystem.getFile(Alloy.Globals.directory,'categorie');\r\ndirCat.createDirectory(); // this creates the directory\r\nAlloy.Globals.directoryCategorie = Ti.Filesystem.applicationDataDirectory + \"myAppDir/categorie/\";\r\n\r\nfunction downloadImmagineCategoria(url,nome){\r\n\tvar xhr = Titanium.Network.createHTTPClient();\r\n\txhr.onload = function() {\r\n\t\tvar file = Ti.Filesystem.getFile(Alloy.Globals.directory,'categorie',nome);\r\n\t\tfile.write(this.responseData,false);\r\n\t};\r\n\txhr.open(\"GET\",url);\r\n\txhr.send();\r\n}\r\n{code}\r\n\r\nin another controller I load the downloaded image and I put them in a tableview with this code, and I want the image as a background (I included in the code all the test that I've done)\r\n\r\n{code:javascript}\r\n//\r\n//.... some code where I defined _listCat and tableData\r\n//\r\n\r\nvar fileImmagine = Ti.Filesystem.getFile(Alloy.Globals.directory,'categorie',_listCat[i].default_image); //name of the image that I download \r\n\r\nvar row = Ti.UI.createTableViewRow({\r\n className:'sceltaCategoriaRow', // used to improve table performance\r\n backgroundColor: '#bbb',\r\n rowIndex: _listCat[i].id, // custom property\r\n height:\"162dp\"\r\n});\r\nvar image = Ti.UI.createImageView({\r\n image : fileImmagine, //this doesn't work on Windows Phone but works on Android\r\n //****image: fileImmagine.nativePath, //this doesn't work on Windows Phone but works on Android\r\n //*****image: \"img/someimage.png\", //this works on both platform but someimage.png is an image that I've already in my app and not the downloaded one\r\n width: Ti.UI.FILL, height: Ti.UI.FILL,\r\n});\r\nrow.add(image);\r\nvar labelUserName = Ti.UI.createLabel({\r\n color: Alloy.Globals.white,\r\n width: '80%',\r\n textAlign: 'center',\r\n font:{\r\n fontFamily: Alloy.Globals.customFont, \r\n fontSize: '18sp',\r\n },\r\n text: _listCat[i].name,\r\n width:200, height: 30\r\n});\r\nrow.add(labelUserName);\r\n\r\ntableData.push(row);\r\n{code}", "attachment": [], "flagged": false, "summary": "Windows: Downloaded image not show in ImageView", "creator": { "name": "AlbWebbergate", "key": "albwebbergate", "displayName": "Alberto Bonacina", "active": true, "timeZone": "Europe/Rome" }, "subtasks": [], "reporter": { "name": "AlbWebbergate", "key": "albwebbergate", "displayName": "Alberto Bonacina", "active": true, "timeZone": "Europe/Rome" }, "environment": "Titanium Studio 4.4.0.201511241829\r\nOperating system Windows 8.1 Pro 64 bit\r\nNodejs version 4.2.4\r\nTitanium cli version 5.0.5\r\nTitanium SDK 5.1.1GA platforms (android, mobileweb, windows)\r\nVisual studio Community 2013 Update 5\r\nWindows Phone SDK 8.0 (Installed with Visual Studio)\r\nWindows Phone Emulator 8.1 ENU\r\nWindows Phone Emulator 8.1 SDK and Emulators\r\nHyper-V Enabled", "closedSprints": [ { "id": 580, "state": "closed", "name": "2016 Sprint 3 SDK", "startDate": "2016-01-30T01:31:48.991Z", "endDate": "2016-02-13T01:31:00.000Z", "completeDate": "2016-02-15T05:32:40.725Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "375370", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium_mobile_windows/pull/540", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-01-28T00:04:11.000+0000", "updated": "2016-01-28T00:04:11.000+0000" }, { "id": "382750", "author": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "updateAuthor": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "created": "2016-04-14T19:54:17.000+0000", "updated": "2016-04-14T19:54:17.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }