[英]show an image from gallery as thumbnail in titanium image view
我需要將圖庫中的圖像顯示為項目的縮略圖。 如何在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
}
});`
https://github.com/railskarthi/TiMultiImagePicker您可以使用此模塊將圖片顯示為圖庫中的縮略圖
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.