Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27499] Android: TableView doesn't trigger the click event views scrolled off/in as of 8.1.0

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionDuplicate
Resolution Date2020-05-14T23:17:28.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsandorid, regression, sdk-8.2.0.GA, tableview
ReporterVittorio Sorbera
AssigneeGary Mathews
Created2019-10-11T16:35:09.000+0000
Updated2020-05-14T23:17:28.000+0000

Description

I have a tableview with several rows containing views and labels. If the rows are all visible in the window, I can trigger the click event in the tableview. If instead I have more elements, as soon as I scroll, I can no longer trigger the click event on the first rows, but only on the final ones. It works with SDK 8.0.1 and 8.0.2
var w  = Ti.UI.createWindow({
    backgroundColor : "white",
    fullscreen : true
});
var tv = Ti.UI.createTableView({
    top : 0,
    width : "100%",
    height : Ti.UI.SIZE,
});
var data = [];
for(var i=0; i<50; i++){
    var tvr = Ti.UI.createTableViewRow();
    tvr.add(Ti.UI.createView({
        backgroundColor : "blue",
        height : 50, width : "95%"
    }));
    tvr.add(Ti.UI.createLabel({
        color : "white",
        text : "row "+i
    }));
    data.push(tvr);
}
tv.data = data;
tv.addEventListener("click",function(e){
    Ti.API.info("Click row " + e.index);
});
tv.addEventListener("scroll",function(e){
    Ti.API.info("Scroll");
});
w.add(tv);
w.open();

Comments

  1. Sharif AbuDarda 2019-10-24

    Hello [~astrovicapps], I have tried to test your project with the sampel code. I was ablre to reproduc ethe behavior. In my observation before the scroll I can initiate the click enent in any rod that is shown in the screen. But after I scroll, some of the rows click event is not working. And it's random. After one scroll if one rows click enent wasn't firing? if I come back to the same row after couple of more scrol it works but other rows which was workign previously dosen't work. Tested in Android emulator with SDK 8.2.0.GA. Moving to engineering. Thanks.
  2. Srinivasan Pulipakkam 2020-03-13

    [~gmathews] Can you please review this as part of the tableview rewrite ?
  3. Dominic Maricic 2020-05-14

    Is someone working on fixing this? Our program is 99% made up of TableView and this problem has plagued us for over a year. It's a massive bug. Its been 7 months since this was confirmed by Axway and there's no fix?
  4. Joshua Quick 2020-05-14

    Ticket [TIMOB-27769] solves this issue. It's scheduled to be fixed in Titanium 9.0.2.

JSON Source