-
-
Save nuno/408e2b37d98b2a0f5f153f45a2199dc8 to your computer and use it in GitHub Desktop.
Titanium Sticky Header
This file contains hidden or 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
// just a quick n dirty test. See result: http://monosnap.com/file/wT6dJZ4zOrHzjiXi1mhfnIocEZiAWW | |
var headerView = Ti.UI.createView({ | |
backgroundColor:'#fff', | |
height:80, | |
layout:'horizontal' | |
}); | |
headerView.add(Ti.UI.createButton({title:'$100',left:20,top:13,height:50,width:80,backgroundColor:'#ca3943',borderRadius:4,color:'#fff'})); | |
headerView.add(Ti.UI.createButton({title:'$500',left:20,top:13,height:50,width:80,backgroundColor:'#ca3943',borderRadius:4,color:'#fff'})); | |
headerView.add(Ti.UI.createButton({title:'$1000',left:20,top:13,height:50,width:80,backgroundColor:'#ca3943',borderRadius:4,color:'#fff'})); | |
var sections = []; | |
sections[0] = Ti.UI.createTableViewSection(); | |
var row1 = Ti.UI.createTableViewRow({height:320}); | |
row1.add(Ti.UI.createImageView({width:320,height:Ti.UI.FILL,image:'http://upload.wikimedia.org/wikipedia/commons/2/2b/2nd_Toyota_Prius.jpg'})); | |
sections[0].add(row1); | |
sections[1] = Ti.UI.createTableViewSection({ | |
headerView:headerView | |
}); | |
sections[1].add(Ti.UI.createTableViewRow({ | |
height:1000, | |
backgroundColor:'#efefef' | |
})); | |
var win = Titanium.UI.createWindow({backgroundColor:'#fff'}); | |
var table = Ti.UI.createTableView({ | |
data: sections | |
}); | |
win.add(table); | |
win.open(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment