i get data from my wordpress categories in titanium mobile app, i have 5 categories how to set background this 5 row ? This My Categories JS
$.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();
});
This category-item
$.c_title.text = args.data.name ;
$.c_counts.text = args.data.count ;
$.row.Item = args.data;
Assuming $.row
is the Ti.UI.TableViewRow
object, you'd do:
$.row.backgroundImage = args.data.variableHoldingImagePath;