【发布时间】:2017-02-19 07:49:39
【问题描述】:
我已将图像存储在 Ti.FileSystem (appcelerator) 并成功存储。但我无法将其取回并显示在 ImageView 中
FullFileName="HA_2312751361_0566296329";
var fullFileNameForForm=FullFileName+"_form.png";
var fileForm = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory,fullFileNameForForm);
console.log("contents="+fileForm); // It gets the contents of the file
if(fileForm.exists()){
var contents=fileForm.read();
var image=Titanium.Filesystem.applicationDataDirectory + Ti.Filesystem.separator + contents.image;
//it crashes in above line for contents.image
$.id_buttonImage.backgroundImage=image;
}
else{
console.log('fileNotExists');
}
【问题讨论】:
标签: javascript titanium appcelerator