Created
December 15, 2011 23:52
-
-
Save mauropm/1483560 to your computer and use it in GitHub Desktop.
Example Losing Events inside ScrollView
This file contains 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 textWindow = Ti.UI.createWindow({ | |
backgroundColor:'white', | |
borderColor: 'black', | |
borderWidth: 1, | |
width: '100%', | |
height: '100%', | |
navBarHidden: true | |
}); | |
var scrollView = Ti.UI.createScrollView({ | |
layout: 'vertical', | |
height: '100%', | |
contentWidth: 'auto', | |
contentHeight: 'auto', | |
showVerticalScrollIndicator: true, | |
touchEnabled: true | |
}); | |
var titleLabel = Ti.UI.createLabel({ | |
left: 6, | |
top: 6, | |
height: 22, | |
color: 'black', | |
textAlign: 'left', | |
text: "Test", | |
touchEnabled: false | |
}); | |
var textLabel = Ti.UI.createLabel({ | |
color: 'black', | |
text: "Test", | |
textAlign: 'left', | |
left: 6, | |
right: 6, | |
top: 6, | |
height: 'auto', | |
touchEnabled: false | |
}); | |
scrollView.add(titleLabel); | |
scrollView.add(textLabel); | |
textWindow.addEventListener('singletap', function(){ | |
var t3 = Ti.UI.create2DMatrix().scale(0); | |
textWindow.close({transform:t3,duration:300}); | |
}); | |
textWindow.add(scrollView); | |
textWindow.open(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment