Skip to content

Instantly share code, notes, and snippets.

@hal-gh
Forked from anonymous/gist:667756
Created November 8, 2010 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hal-gh/667800 to your computer and use it in GitHub Desktop.
Save hal-gh/667800 to your computer and use it in GitHub Desktop.
var win1 = Ti.UI.currentWindow;
var imageScrollView = Titanium.UI.createScrollView({
contentWidth:'auto',
contentHeight:'auto',
top:0,
showVerticalScrollIndicator:true,
showHorizontalScrollIndicator:true
});
var saveImageView = Titanium.UI.createImageView({
top: 10,
left: 10,
width: '300',
height: '220',
canScale: true,
image: event.media
});
imageScrollView.add(saveImageView);
win1.add(imageScrollView);
var select;
var category;
var picture = '';
postPhoto.addEventListener('click',function(e){
Titanium.Media.openPhotoGallery({
success:function(event){
picture = event.image;
saveImageView.image = picture;
},
cancel:function(){
Titanium.API.info('Photo Gallery cancel');
},
error:function(error){
Titanium.API.info('Photo Gallery error');
},
allowImageEditing:true
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment