Tableview background image
Adding a background image to a tableview as below put the same small piece of the image in each cell.
I expected the complete image to be behind the whole table.
// create table view
var tableview = Titanium.UI.createTableView({
data:data,
opacity:'.4',
backgroundImage:'Default.png'
maxRowHeight:'20'
});
5 Answers
-
I'm having this same issue.
I have a background image for my main UIView:
Titanium.UI.setBackgroundImage('images/main_bg.jpg');
Then, I have a table that uses the GROUP style. The default background for this is the light grey pinstripe one. I'd like to make that light grey go away entirely to reveal the main background underneath.
UPDATE:
I just discovered you can use this:
backgroundColor:'transparent'
Think that'll do the trick
-
Try this:
//Set window background Ti.UI.setBackgroundImage('Default.png'); //Create table view var tableview = Titanium.UI.createTableView({ data:data, opacity:'.4', maxRowHeight:'20', //Set BG transparent backgroundColor:'transparent', //Set row color - white rowBackgroundColor:'white' });
-
You're right. I don't know what it's supposed to do.
[ Just also a note that the image in the row is repeated and is aligned to the bottom left of the image. ]
-
You can set the Background of the windows or view as your image and then set the tableview as transparent. Don't know if that helps.
win = Ti.UI.CurrentWindow; win.backgroundImage = 'Default.png'; // create table view var tableview = Titanium.UI.createTableView({ data:data, opacity:'.4', maxRowHeight:'20' });
-
That just sets the transparency of hte table rows - is there a way to have the table rows be white at full opacity, and the background show underneath?