Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1979] Android - row highlight fails with touch

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:57:43.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.5.0 M05
ComponentsAndroid
Labelsandroid, defect, regression
ReporterThomas Huelbert
AssigneeDon Thorp
Created2011-04-15T03:07:05.000+0000
Updated2011-04-17T01:57:43.000+0000

Description

1.Install GG, launch the app
2.tap the video game icon
3.in the search, type in "killzone"
4.tap killzone 2 and let the page load.
5.Use your finger to tap the "Guru" row
6.Tap the table rows below as well

results: using tap the guru row fails to show highlight (works fine using trackball), the rows below have intermittent highlight behavior.

As Per Bill "It was one of the commits in between your Tuesday build (1.4.2 80434d) and my fix (1.4.2.5935b3) that caused the problem with the row highlight" (Thomas added build numbers to Bills quote)

http://github.com/appcelerator/titanium_mobile/commit/d074f62eaf9"> http://github.com/appcelerator/titanium_mobile/commit/d074f62eaf9

Comments

  1. Bill Dawson 2011-04-15

    Don: note that it's not that row highlighting is totally broken. If I create a table that has rows with just the title property set, then it works. But the affected application has an image view and multiple labels that are .add'd to the row. The highlighting works in the commit just before your commit (http://github.com/appcelerator/titanium_mobile/commit/d074f62eaf9)">http://github.com/appcelerator/titanium_mobile/commit/d074f62eaf9), but then not after.

    I'll try to make a more general failcase so you don't have to go wading through their code.

  2. Bill Dawson 2011-04-15

    Here's the failcase I promised. All in one app.js:

       
       /*global Ti, Titanium, alert, JSON */
       Titanium.UI.setBackgroundColor('#000');
       var win = Titanium.UI.createWindow({  
           title:'Test',
           backgroundColor:'#fff',
           fullscreen: true,
           exitOnClose: true
       });
       
       // Rows with just "title" -- highlighting works fine.
       var plainrows = [];
       for (var i = 0; i < 3; i++) {
           plainrows.push(
               Ti.UI.createTableViewRow( {title: 'row ' + i} )
           );
       }
       
       win.add( Ti.UI.createTableView( {
           data: plainrows,
           top: 0, left: 0, right: 0, height: 150
       } ) );
       
       
       // Rows with views in them -- highlighting not working
       // since commit d074f62eaf9.
       
       var viewrows = [];
       for (i = 0; i < 3; i++) {
           var l = Ti.UI.createLabel({
               text: 'row ' + i,
               top: 0, left: 0, width: 100, height: 40
           });
           var tr = Ti.UI.createTableViewRow();
           tr.add(l);
           viewrows.push(tr);
       }
       
       win.add( Ti.UI.createTableView( {
           data: viewrows,
           top: 160, left: 0, right: 0, height: 150
       } ) );
       
       win.open();
       

    If you click on the labels in the second set of rows, no highlighting will occur, whereas it did before commit http://github.com/appcelerator/titanium_mobile/commit/d074f62eaf9"> d074f62eaf9 (try building with 1.4.0 to see it work). I'm afraid this is probably high priority because it's a very noticeable regression in GG, for example.

  3. Bill Dawson 2011-04-15

    I should have tagged this a regression.

  4. Don Thorp 2011-04-15

    Duplicate of #1509

  5. Don Thorp 2011-04-15

    I incorrectly marked this as a dup of #1509. #2101 is however a duplicate of this one.

  6. Don Thorp 2011-04-15

    For consideration in M05

  7. Marshall Culpepper 2011-04-15

    Labels are now clickable by default, which causes the event handler in Label to not send the event up to the TableViewRow. You can disable this behavior by setting "touchEnabled: false" in the creation proxy for each label that you want to click through to the row. Marking as resolved.

JSON Source