Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25759] Android: ListItem selectedBackgroundColor property not working.

GitHub Issuen/a
TypeBug
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 7.0.1, Release 8.0.2
Fix Version/sn/a
ComponentsAndroid
Labelsandorid, engSchedule, listitem
ReporterJebun Naher
AssigneeYordan Banev
Created2018-02-07T09:22:00.000+0000
Updated2019-09-19T15:25:30.000+0000

Description

*Issue Description:* The selectedBackgroundColor property of ListItem is not working on android. *Test Steps:* - Create an alloy project and run the test code. - Click on the listView row. Observe that the selectedBackgroundColor does not set the row's background color when selected. *Expected:* ListView row's background color should change when I click on the row. *Actual:* ListView row's background color does not change. *Test Code:* *index.xml*
<Alloy>
	<Window title="basic" backgroundColor="red">
		<ListView id="listView" >
			<ListSection id="section">
				<ListItem title="row 1" />
				<ListItem title="row 2" />
				<ListItem title="row 3" />
				<ListItem title="row 4" />
				<ListItem title="row 5" />
				<ListItem title="row 6" />
				<ListItem title="row 7" />
				<ListItem title="row 8" />
				<ListItem title="row 9" />
				<ListItem title="row 10" />
			</ListSection>
		</ListView>
	</Window>
</Alloy>
*index.js*
$.listView.addEventListener('itemclick', function(e) {
    var item = $.section.getItemAt(e.itemIndex);
     item.properties.selectedBackgroundColor = 'yellow';
    $.section.updateItemAt(e.itemIndex, item);
});
$.index.open();
Thanks!

Comments

No comments

JSON Source