Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5188] Android: TouchEnabled property does not work on TableView

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2013-06-20T23:29:06.000+0000
Affected Version/sRelease 1.7.2, Release 2.0.1, Release 3.1.0
Fix Version/s2013 Sprint 13 API, 2013 Sprint 13, Release 3.2.0
ComponentsAndroid
Labelsapi, module_tableview, qe-testadded
ReporterKarol Pomaski
AssigneeBiju pm
Created2011-09-01T08:01:45.000+0000
Updated2014-02-12T09:38:54.000+0000

Description

Problem

TouchEnabled property does not work on TableView. We are not able to block the rows from firing the "click" event.

Reproducible Steps

1. Execute attached code 2. Click on any row 3. The "click" event was executed however tableView has set a "touchEnabled: false" property

Sample Code

var win = Ti.UI.createWindow({
   title: 'Table' ,
   navBarHidden: true
});

var tableData = [{title: 'one'}, {title: 'two'}, {title: 'three'}];

var tableView = Ti.UI.createTableView({
    data: tableData,
    touchEnabled: false
});
tableView.addEventListener('click', function(e){
   alert("Event fired"); 
});



win.add(tableView);
win.open();

Associated HelpDesk ticket

http://appc.me/a/APP-787515

Comments

  1. Don Thorp 2011-09-01

    Try using the new form with row proxies and disabling touch on those controls as a workaround.
  2. Karol Pomaski 2011-09-01

    I already tried Titanium.UI.createTableViewRow but touchEnabled property does not work neither there. My workaround was to open a new transparent view (that cover the screen) when the "click" event is fired so next events won't come to the tableview.
  3. Nikhil Sharma 2012-05-16

    Still bug - tested on Ti SDK 2.0.1 GA2, still an issue.
  4. Soumya Kanti Kar 2012-07-17

    I tested this in Mobile SDK 2.1.1 on Galaxy S2 4.0.3 but the issue is still present. The touchEnabled property is having no effect.
  5. heenok 2012-11-05

    Same issue here ! Nothing new since 1 year on this
  6. jithinpv 2013-04-26

    issue reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 Android Emulator: Android SDK version: 2.2
  7. Biju pm 2013-06-06

    added touchEnabled property check and manage the touch events https://github.com/appcelerator/titanium_mobile/pull/4360
  8. Priya Agarwal 2013-10-21

    Verified the fix with: Appc-Studio: 3.2.0.201310181700 Sdk:3.2.0.v20131018154951 alloy:1.2.2 npm:1.3.2 titanium:3.2.0 titanium-code-processor:1.0.3 Device:Google Nexus 7(v4.3),iphone5(v7) Xcode: 5 Closing since TouchEnabled property working fine on tableView for both the platforms.

JSON Source