Created
January 31, 2012 16:09
-
-
Save ismaGNU/1711343 to your computer and use it in GitHub Desktop.
TableView Data
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 row = Ti.UI.createTableViewRow(Nv.combine($$.TableViewRow,{ | |
height:'auto' | |
})), | |
photo = Ti.UI.createImageView({ | |
image:(gigs[i].images.small) ? gigs[i].images.small : '/img/nophoto.jpg', | |
left:0, | |
top:0, | |
width:56, | |
height:56 | |
}), | |
venue_label = Ti.UI.createLabel({ | |
text: '', | |
color: '#999', | |
left:65, | |
height:'auto', | |
width:'auto', | |
top:top+22, | |
bottom:5, | |
font:{fontWeight:'normal',fontSize:Nv.ui.theme.fontSize} | |
}), | |
price_label = Ti.UI.createLabel({ | |
text:'', | |
textAlign:'right', | |
right:9, | |
top:5, | |
height:28, | |
width:60, | |
color:'white', | |
font:{fontWeight:'bold',fontSize:Nv.ui.theme.fontSize} | |
}), | |
ticket_img = Ti.UI.createImageView({ | |
image:'/img/gigs/ticket.png', | |
right:5, | |
top:5, | |
height:28, | |
width:60 | |
}); | |
if (price) { | |
price_label.text = price + ' '; | |
row.add(ticket_img); | |
row.add(price_label); | |
} | |
row.add(photo); | |
row.add(venue_label); | |
row.className = 'gig'; | |
data.push(row); | |
//I make rows in a bucle and then, setData(data) to the tableView |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment