Created
November 10, 2010 14:49
-
-
Save kwhinnery/670939 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
// this sets the background color of the master UIView (when there are no windows/tab groups on it) | |
Titanium.UI.setBackgroundColor('#fff'); | |
var win = Titanium.UI.createWindow({ | |
title:'Testing' | |
}); | |
var scrollView = Titanium.UI.createScrollableView({ | |
currentPage:1, | |
showPagingControl: false | |
}); | |
function doClick(e) { | |
var btn = e.source; | |
alert(" -- clicked button: " + btn); | |
}; | |
for (var i = 0;i<20;i++) { | |
var newView = Ti.UI.createView(); | |
var right = Titanium.UI.createButton({ | |
image:'ui/right.png', | |
left: 10, | |
width: 20 | |
}); | |
right.addEventListener('click',doClick); | |
newView.add(right); | |
scrollView.addView(newView); | |
} | |
win.add(scrollView); | |
win.open(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment