-
-
Save hal-gh/667799 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var imageScrollView = Titanium.UI.createScrollView({ | |
contentWidth:'auto', | |
contentHeight:'auto', | |
top:0, | |
showVerticalScrollIndicator:true, | |
showHorizontalScrollIndicator:true | |
}); | |
var select; | |
var category; | |
var picture = ''; | |
postPhoto.addEventListener('click',function(e){ | |
Titanium.Media.openPhotoGallery({ | |
success:function(event){ | |
var saveImageView = Titanium.UI.createImageView({ | |
top: 10, | |
left: 10, | |
width: '300', | |
height: '220', | |
canScale: true, | |
image: event.media, | |
}); | |
imageScrollView.add(saveImageView); | |
picture = saveImageView.toBlob(); | |
win1.add(saveImageView); | |
}, | |
cancel:function(){ | |
Titanium.API.info('Photo Gallery cancel'); | |
}, | |
error:function(error){ | |
Titanium.API.info('Photo Gallery error'); | |
}, | |
allowImageEditing:true | |
}); | |
win1.add(imageScrollView); | |
}); | |
win1.add(postPhoto); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment