Time for action – adding a styled TableViewRow object
With a few simple additions and some changes to fonts we can make a more complex table view layout. This example will add a TableViewRow
object that is similar in appearance to the mailbox e-mail listing. Perform the following steps to add a styled TableViewRow object:
Add an empty
TableViewRow
object:var secondRow = Ti.UI.createTableViewRow({});
Add a title to the new row:
var theTitle = Ti.UI.createLabel({ text: 'The title', font:{fontSize:'16',fontWeight:'bold'}, minimumFontSize:'12', textAlign:'left', top:'2', left:'10', height:'20' });
Add another label with context information:
var theSnippet = Titanium.UI.createLabel({ text:'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor', font:{fontSize:'11',fontWeight:'normal'}, textAlign:'left', color:'#666', bottom:'0', left:'10', height...