Skip to content

Instantly share code, notes, and snippets.

@pablasso
Created August 31, 2011 17:59
Show Gist options
  • Save pablasso/1184212 to your computer and use it in GitHub Desktop.
Save pablasso/1184212 to your computer and use it in GitHub Desktop.
ScrollView with internal views
var tmpWindow = Titanium.UI.createWindow({
backgroundColor:'gray'
});
var tmpScrollView = Titanium.UI.createScrollView({
contentWidth:320,
contentHeight:'auto',
showVerticalScrollIndicator:'true'
});
var tmpView1 = Titanium.UI.createView({
backgroundColor:'red',
height:145,
width:145,
left:10,
top:10
});
var tmpView2 = Titanium.UI.createView({
backgroundColor:'blue',
height:145,
width:145,
left:165,
top:10
});
tmpScrollView.add(tmpView1);
tmpScrollView.add(tmpView2);
tmpWindow.add(tmpScrollView);
/* main */
var main = Titanium.UI.createWindow();
main.add(tmpWindow);
main.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment