I have 5 categories of data on my WordPress blog and in my Titanium mobile app, I added row backgrounds to my rows. However, all rows have the same background. How can I set a different background for each row?
View my normal table view screen here:
View my added row background image screen here:
Here is my Categories .JS code:
$.init = function() {
var rows = [];
getCategories(function(_data) {
for (var x = 0; x < _data.length; x++) {
rows.push(Alloy.createController('category-item', {
data : _data[x]
}).getView());
}
$.categories_table.setData(rows);
APP.Loading.hide();
});
And here is my categories-items.js code:
$.c_title.text = args.data.name ;
$.c_counts.text = args.data.count ;
$.row.Item = args.data;
$.row.backgroundImage = 'durum.png';