Get X and Y from scrollable view
According to the documentation (http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI.ScrollableView-object), I'm supposed to be able to get the TouchStart from a ScrollableView and grab the X and Y coordinates, but it doesn't seem to be working. Am I doing anything wrong?
var win = Titanium.UI.createWindow();
win.navBarHidden=true;
var view1 = Ti.UI.createView({backgroundColor: '#000'});
var view2 = Ti.UI.createView({backgroundColor: '#fff'});
var view3 = Ti.UI.createView({backgroundColor: '#cfcfcf'});
var scrollView = Titanium.UI.createScrollableView({
views:[view1,view2,view3],
showPagingControl:false,
currentPage:0
});
Ti.API.info('test log entry');
win.add(scrollView);
scrollView.addEventListener('click',function(e){
Titanium.API.info('click');
});
scrollView.addEventListener('swipe',function(e){
Titanium.API.info('swipe');
});
scrollView.addEventListener('scroll',function(e){
Titanium.API.info('scroll');
Titanium.API.info(e.x);
});
scrollView.addEventListener('touchstart',function(e){
Titanium.API.info('touchstart');
});
win.open();