Skip to content

Instantly share code, notes, and snippets.

Created November 8, 2010 14:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save anonymous/667756 to your computer and use it in GitHub Desktop.
Save anonymous/667756 to your computer and use it in GitHub Desktop.
imageview
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