I need to display an image from the gallery as thumbnail for my project. How to display it in an imageview. Thanks in advance. `
我需要将图库中的图像显示为我项目的缩略图。如何在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
}
});`
1 个解决方案
#1
0
https://github.com/railskarthi/TiMultiImagePicker You can use this module for showing image as thumbnail from the gallery
https://github.com/railskarthi/TiMultiImagePicker您可以使用此模块将库中的图像显示为缩略图
#1
0
https://github.com/railskarthi/TiMultiImagePicker You can use this module for showing image as thumbnail from the gallery
https://github.com/railskarthi/TiMultiImagePicker您可以使用此模块将库中的图像显示为缩略图