Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19895] Android: ListItem's selectedBackgroundColor dissapeared

GitHub Issuen/a
TypeBug
Priorityn/a
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsandroid
ReporterWilson Liaw
AssigneeUnknown
Created2015-10-08T12:01:11.000+0000
Updated2018-02-28T19:55:24.000+0000

Description

If ListItem's background color are not the same, scroll to ListView's bottom, and then back to top, some of those ListItem's selectedBackgroundColor will not show when clicked.
var win = Ti.UI.createWindow({
	backgroundColor : 'white'
});

var template = {
	properties : {
		selectedBackgroundColor : '#2990FE'
	},
};

var listView = Ti.UI.createListView({
	templates : {
		'testTemplate' : template
	},
	defaultItemTemplate : 'testTemplate'
});

var data = [];
for (var i = 0; i < 30; i++) {
	data.push({
		properties : {
			backgroundColor : (i % 2) ? '#44112233' : 'transparent',
		},
	});
}

var section = Ti.UI.createListSection();
section.setItems(data);
listView.sections = [section];
win.add(listView);
win.open();

Comments

No comments

JSON Source