Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var scrollView = Titanium.UI.createScrollView({
- contentWidth:'auto',
- contentHeight:'auto',
- top:0,
- showVerticalScrollIndicator:true,
- showHorizontalScrollIndicator:true,
- zoomScale:1
- });
- var view = Titanium.UI.createImageView({
- image:'zebra.jpg',
- width:'auto',
- height:'auto'
- });
- var x=0;
- function zoom(){
- if(x==1){
- view.animate({width:view.width/2, height:view.height/2});
- x=0;
- }
- else{
- view.animate({width:view.width*2, height:view.height*2});
- x=1;
- }
- }
- view.addEventListener('doubletap',zoom);
- scrollView.add(view);
- win1.add(scrollView);
Add Comment
Please, Sign In to add comment