How to get the x and y coordinates of the tap / touch user relative to the window - Android-titanium mobile?

Can someone tell me how to get the x / y coordinates of the touch / touch user relative to the android window of the titanium mobile?

I need to add a close to tableviewrow popup when the user selects a row. How to determine the position of x, y (top / left)?

0
source share
3 answers

you can use

row.addEventListener('click',function(e){
    alert('left:'+ e.x + ' top:'+ e.y);
});

where row is a Titanium.UI.TableViewRow object. For other objects (e.g. windows / views) you can use the same eventlistener.

: . .. .

, - , addEventListener .

+1
+2
0

All Articles