Hi all, I have a label with a background image and over it a tableview with a list of rows. I need to give the tableview rows an opacity so the label will appear and the rows still shown. How can I give a tableview row an opacity on ios? On Android its working but on iPad not!
var row = Titanium.UI.createTableViewRow({ id : rows.fieldByName('Id'), className:'simplerow', // Very important for rendering. Because the parser will consider all rows having the same className as a row having the same design, // just the content will change. height : '50px', backgroundColor : row_color, // backgroundSelectedColor : '#960000', // When you click on the row rowTitle: '', // This variable will handle the title of the row, so we can catch it later opacity: 0.4, left : '6%', rightImage : 'right_arrow-'+Titanium.Platform.osname+'.png' }); // Title for the row var title = Titanium.UI.createLabel({ className:'simplelabel', //backgroundSelectedColor : '#960000', text : " "+rows.fieldByName('F_Keyword'), font : { fontSize: 20, fontWeight: 'bold' }, height : '100%', width : '100%', color : '#fff' }); row.add(title); row.rowTitle = title; row.rowID = row.id; // This is an approach without using Table view rows and labels (FASTER THAN THE ABOVE ONE) dataArray.push(row);
1 Answer
Why you don't create a view into your row. You put everythings into your row and you write:
backgroundColor:'transparent'So after the background of your row is ..... your view !
Your Answer
Think you can help? Login to answer this question!