Titanium JIRA Archive
Appcelerator Community (AC)

[AC-6704] Android Listview marker event

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionFixed
Resolution Date2021-06-03T10:31:09.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
LabelsListView, android, infinitescroll, marker
Reportersaid chaouche
AssigneeAbir Mukherjee
Created2021-05-28T14:52:27.000+0000
Updated2021-06-03T10:31:09.000+0000

Description

Marker event in ListView not work correctly on TiSDK 10.0.0.GA, see code below Workaround is to set a ListItem Height is fix the problem but sometime the event not fire and need no scroll again to have the event. This bug have a big impact on app with infinite scroll var sections = []; var listView = Ti.UI.createListView(); listView.addEventListener("marker", (e) => { Ti.API.info("MARKER EVENT FIRED"); addSection(); }); var win = Ti.UI.createWindow({ backgroundColor: 'white' }); win.addEventListener("open", addSection) win.add(listView); win.open(); function addSection() { var dataSet = []; for (var i = 0; i < 20; i++) { dataSet.push({ properties: { title: "ITEM AT " + (i + 1), // set height size to fix marker event bug // height: 50, } }); } var section = Ti.UI.createListSection({ items: dataSet }); sections.push(section); listView.sections = sections; var marker = { sectionIndex: sections.length - 1, itemIndex: dataSet.length - 1 } Ti.API.info("MARKER", JSON.stringify(marker)); listView.addMarker(marker); }

Comments

  1. Ewan Harris 2021-06-03

    This is fixed by TIMOB-28462 and available in 10.1.0 (ti sdk install -b master) and 10_0_X (ti sdk install -b 10_0_X) CI builds

JSON Source