Project: titanium
Issue TIMOB-20236: Windows: Downloaded image not show in ImageView
I create a simple alloy app and I download some remote image with this function {code:javascript} var dir = Titanium.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory,'myAppDir'); dir.createDirectory(); // this creates the directory Alloy.Globals.directory = Ti.Filesystem.applicationDataDirectory + "myAppDir/"; var dirCat = Titanium.Filesystem.getFile(Alloy.Globals.directory,'categorie'); dirCat.createDirectory(); // this creates the directory Alloy.Globals.directoryCategorie = Ti.Filesystem.applicationDataDirectory + "myAppDir/categorie/"; function downloadImmagineCategoria(url,nome){	var xhr = Titanium.Network.createHTTPClient();	xhr.onload = function() {	var file = Ti.Filesystem.getFile(Alloy.Globals.directory,'categorie',nome);	file.write(this.responseData,false);	};	xhr.open("GET",url);	xhr.send(); } {code} in 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) {code:javascript} // //.... some code where I defined _listCat and tableData // var fileImmagine = Ti.Filesystem.getFile(Alloy.Globals.directory,'categorie',_listCat[i].default_image); //name of the image that I download var row = Ti.UI.createTableViewRow({ className:'sceltaCategoriaRow', // used to improve table performance backgroundColor: '#bbb', rowIndex: _listCat[i].id, // custom property height:"162dp" }); var image = Ti.UI.createImageView({ image : fileImmagine, //this doesn't work on Windows Phone but works on Android //****image: fileImmagine.nativePath, //this doesn't work on Windows Phone but works on Android //*****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 width: Ti.UI.FILL, height: Ti.UI.FILL, }); row.add(image); var labelUserName = Ti.UI.createLabel({ color: Alloy.Globals.white, width: '80%', textAlign: 'center', font:{ fontFamily: Alloy.Globals.customFont, fontSize: '18sp', }, text: _listCat[i].name, width:200, height: 30 }); row.add(labelUserName); tableData.push(row); {code}
Story points: 8