Created
February 22, 2016 18:40
-
-
Save hansemannn/dc321ee21a64c5022537 to your computer and use it in GitHub Desktop.
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 win = Ti.UI.createWindow(); | |
var view1 = Ti.UI.createView({ backgroundColor:'#123' }); | |
var view2 = Ti.UI.createView({ backgroundColor:'#246' }); | |
var view3 = Ti.UI.createView({ backgroundColor:'#48b' }); | |
var view4 = Ti.UI.createView({ backgroundColor:'green' }); | |
view3.addEventListener('click',function(e) | |
{ | |
Titanium.API.info("You clicked the view3"); | |
}); | |
/* | |
view3.addEventListener('postlayout', function() { | |
Ti.API.info('postlayout event heard on view3'); | |
}); | |
*/ | |
var scrollableView = Ti.UI.createScrollableView({ | |
views:[view1,view2,view3,view4], | |
showPagingControl:true | |
}); | |
scrollableView.addEventListener("click", function(e) { | |
Ti.API.warn("Click on ScrollableView container fired"); | |
Ti.API.warn(e); | |
}) | |
win.add(scrollableView); | |
win.open(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment