【问题标题】:show an image from gallery as thumbnail in titanium image view在钛图像视图中将图库中的图像显示为缩略图
【发布时间】:2016-03-14 11:05:55
【问题描述】:

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

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

}
});`

【问题讨论】:

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

标签: android ios titanium appcelerator-titanium


【解决方案1】:

https://github.com/railskarthi/TiMultiImagePicker您可以使用此模块将图片显示为图库中的缩略图

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-04-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-09-13
    • 1970-01-01
    • 1970-01-01
    • 2014-08-05
    相关资源
    最近更新 更多