tableView scrolling trouble
I show tableview about 50 - 100 rows with remote images. When i scrolling down my app hangs with no messages. I use different classes for rows. I thought that problem is in memory but 50 rows… I use titanium SDK 1.4.1.1. When i used SDK 1.3.0 i did not have this problem.
>Source code:
for (var i = 0, n = items.length; i < n; i++) {
var row = Ti.UI.createTableViewRow({
newsItem: items[j],
className: "news_list_item_" + i,
height: "auto",
width: "auto",
rightImage: "../images/arrow.png",
hasChild: true
});
row.add(items[j].getShortDescriptionView());
data.push(row);
}
context.tableView = Ti.UI.createTableView({
data: data,
top: context.searchView.size.height,
bottom: context.toolbar.size.height
});
context.currentWindow.add(context.tableView);
1 Answer
-
use tableView.setData(data)