Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-28212] Android: Listview modifies other rows on scroll

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionUnresolved
Affected Version/sRelease 9.0.3, Release 9.2.1
Fix Version/sRelease 9.3.0
ComponentsAndroid
Labelsn/a
ReporterSamir Mohammed
AssigneeGary Mathews
Created2020-10-28T14:12:35.000+0000
Updated2020-11-20T00:24:19.000+0000

Description

There is an issue with Android and the Listview element. If you modify a row (e.g change the background colour) and then scroll up/down so that the row moves out of view, other rows pick up the property change. Please find attached modified version of the kitchen sink v2. Build for Android. Head into the list view example and then select a row, scroll up and down to push the row out of view and you will see other rows erroneously pick up the property change. Function that is calling on click..
function handleListViewClick(e) {
logger.log('Ti.UI.ListView clicked cell at index', e.sectionIndex + ' / ' + e.itemIndex);

var item = e.section.getItemAt(e.itemIndex);

item.properties.backgroundColor = "#696969";

e.section.updateItemAt(e.itemIndex, item);

if (OS_IOS) {
this.deselectItem(e.sectionIndex, e.itemIndex);
}
}
Have also attached a gif of the issue. Tested on 9.0.1.GA and 9.2.1.GA - Same issue. Android 10.

Attachments

FileDateSize
kitchensink-v2 2.zip2020-10-28T14:10:59.000+00004193888
Screen_Recording_2020-10-28_at_11.08.25.gif2020-10-28T14:07:41.000+00002600835

Comments

  1. Gary Mathews 2020-11-02

JSON Source