Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11050] Android: x & y of click event aren't passed to callback

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionInvalid
Resolution Date2013-06-18T22:12:53.000+0000
Affected Version/sRelease 2.1.3, Release 3.1.0
Fix Version/s2013 Sprint 12 API, 2013 Sprint 12
ComponentsAndroid
Labelsexalture, ipass1, tableview
ReporterMitchell Amihod
AssigneeSunila
Created2012-09-18T21:01:53.000+0000
Updated2017-03-30T17:26:19.000+0000

Description

The callback for click event on tableview isn't receiving x & y coords as described in docs on android. Works on iOS just fine. http://docs.appcelerator.com/titanium/2.1/index.html#!/api/Titanium.UI.TableView-event-click

Attachments

FileDateSize
app.js2012-09-18T21:01:53.000+0000307
Screen Shot 2013-03-21 at 2.45.50 PM.png2013-03-21T09:21:32.000+0000421911
Screen Shot 2013-03-21 at 2.46.05 PM.png2013-03-21T09:21:32.000+0000473598

Comments

  1. jithinpv 2013-03-21

    Issue reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 (03/11/13 15:43 0c88429) Titanium SDK version: 3.0.2 (02/07/13 16:46 a4def81) Device: Samsung galaxy s duos Android version: 4.0.4 iOS iPhone Simulator: iOS SDK version: 6.0 jithinpv
  2. Sunila 2013-04-11

    Filled x,y values in rowClicked https://github.com/appcelerator/titanium_mobile/pull/4145
  3. Allen Yeung 2013-04-19

    The docs say that this is not supported in 3.X http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.TableView-event-click IF we do implement this, it should match iOS so that the x & y should be relative to the row (most likely bubbled up from the row).
  4. Allen Yeung 2013-04-19

    Test case for this:
       var win = Titanium.UI.createWindow();
       
       var table = Ti.UI.createTableView();
       var row = Ti.UI.createTableViewRow({
       	title : 'rowtitle',
       	hasChild : true
       });
       
       var row1 = Ti.UI.createTableViewRow({
       	title : 'rowtitle',
       	hasChild : true
       });
       var row2 = Ti.UI.createTableViewRow({
       	title : 'rowtitle',
       	hasChild : true
       });
       var row3 = Ti.UI.createTableViewRow({
       	title : 'rowtitle',
       	hasChild : true
       });
       var label = Ti.UI.createLabel({
       	text : 'this is a label',
       	backgroundColor : 'yellow'
       });
       
       label.addEventListener('click', function(e) {
       	Ti.API.info('---------label------- keys: ' + Object.keys(e));
       	Ti.API.info('--------label--------- x: ' + e.x);
       	Ti.API.info('--------label--------- y: ' + e.y);
       });
       
       row3.addEventListener('click', function(e) {
       	Ti.API.info('---------row-------- keys: ' + Object.keys(e));
       	Ti.API.info('---------row-------- x: ' + e.x);
       	Ti.API.info('--------row--------- y: ' + e.y);
       });
       row.add(label);
       table.setData([row, row1, row2, row3]);
       
       table.addEventListener('click', function(e) {
       	Ti.API.info('---------table------- keys: ' + Object.keys(e));
       	Ti.API.info('---------table-------- x: ' + e.x);
       	Ti.API.info('--------table--------- y: ' + e.y);
       });
       win.add(table);
       win.open();
       
  5. Allen Yeung 2013-06-18

    Marking as invalid since those properties aren't documented to work in android.
  6. Lee Morris 2017-03-30

    Closing ticket as invalid.

JSON Source