Description
When scrolling up and down in a table view with rows that contain image views, the images will swap in and out as we scroll if the className property is set on the row. If there is no className set, the images just blink.
Code to Reproduce
var win = Ti.UI.createWindow({
backgroundColor: 'gray'
});
var remoteImages = [
"http://farm9.staticflickr.com/8236/8486430790_b2f01934aa_n.jpg",
"http://farm9.staticflickr.com/8369/8484326899_40e9f77a30_n.jpg",
"http://farm9.staticflickr.com/8226/8485262581_bc917a9623_n.jpg",
"http://farm9.staticflickr.com/8086/8487703846_5b11c467ac_n.jpg",
"http://farm9.staticflickr.com/8509/8486848974_e9b76eeda7_n.jpg",
"http://farm9.staticflickr.com/8225/8486187175_cdaec4ddf5_m.jpg",
"http://farm9.staticflickr.com/8525/8485814568_92909c3b6e_n.jpg",
"http://farm9.staticflickr.com/8087/8485684090_168f7bdd5d_n.jpg",
"http://farm9.staticflickr.com/8523/8485610133_bd2e82438f_n.jpg"];
var localImages = [
"8486430790_b2f01934aa_n.jpg",
"8484326899_40e9f77a30_n.jpg",
"8485262581_bc917a9623_n.jpg",
"8487703846_5b11c467ac_n.jpg",
"8486848974_e9b76eeda7_n.jpg",
"8486187175_cdaec4ddf5_m.jpg",
"8485814568_92909c3b6e_n.jpg",
"8485684090_168f7bdd5d_n.jpg",
"8485610133_bd2e82438f_n.jpg"];
var rows = [];
for ( i = 0; i < localImages.length; i++) {
Ti.API.info(" Image: " + localImages[i]);
var row = Ti.UI.createTableViewRow({
height : Ti.UI.SIZE,
width : Ti.UI.FILL,
layout : "horizontal",//,
className : "imageRow"
});
var image = Ti.UI.createImageView({
image : localImages[i],
width : '100dp',
height : '100dp',
top : 0,
left : 50
})
var label = Ti.UI.createLabel({
text : ' row ' + i,
color : '#textColor',
height : Ti.UI.SIZE,
width : Ti.UI.SIZE,
top : 10,
right : 50,
textAlign : 'center'
});
row.add(image);
row.add(label);
rows.push(row)
}
var menu = Ti.UI.createTableView();
win.add(menu);
menu.setData(rows);
win.open();
Steps to reproduce
1. Open app
2. Scroll up and down
Note that this happens regardless of whether or not the images are remote or local.
Resolving as duplicate.
Closing ticket as duplicate with reference to the above comments.