Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/94.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 在图像视图中将图库中的图像显示为缩略图_Android_Ios_Titanium_Appcelerator Titanium - Fatal编程技术网

Android 在图像视图中将图库中的图像显示为缩略图

Android 在图像视图中将图库中的图像显示为缩略图,android,ios,titanium,appcelerator-titanium,Android,Ios,Titanium,Appcelerator Titanium,我需要将图库中的图像显示为项目的缩略图。如何在imageview中显示它。提前谢谢 Titanium.Media.openPhotoGallery({ success : function(event) { //Holds the captured image var selectedImg= event.media; // Condition to check the selected media

我需要将图库中的图像显示为项目的缩略图。如何在imageview中显示它。提前谢谢

Titanium.Media.openPhotoGallery({
success : function(event) {

              //Holds the captured image
          var selectedImg= event.media;

               // Condition to check the selected media
              if(event.mediaType == Ti.Media.MEDIA_TYPE_PHOTO) {

//Define an image view with selected image from gallery
                   var imgView = Titanium.UI.createImageView({
   left       : 10,
                                   width    : 250,
   height   : 250,
   image   :  selectedImg    //Set selected image from gallery
});

//Add the image to window for displaying
myWin.add(imgView);
}
},
cancel : function() {
//While cancellation of the process
},
error : function(error) {
               // If any error occurs during the process

}
});`

您可以使用此模块将图像显示为图库中的缩略图

到目前为止您尝试了什么?我一直在尝试从图库中获取图像。