Hi,
I am working on a facebook menu and currently work in Ti Mobile 1.8.2 android. When tracking touchstart from window A and releaseing (touchend) in window B the touchend event is not fired. It is fired when releasing it inside window A. The code is as following:
// Facebook like menu window var leftMenu = Ti.UI.createWindow({ backgroundColor: 'red', top: 0, left: 0, width: 150, zIndex: 1 }); var data = [{title:"Row 1"},{title:"Row 2"},{title:"Row 3"},{title:"Row 4"}]; var tableView = Ti.UI.createTableView({ data: data }); leftMenu.add(tableView); leftMenu.open(); // animations var animateLeft = Ti.UI.createAnimation({ left: 150, duration: 500 }); var animateRight = Ti.UI.createAnimation({ left: 0, duration: 500 }); var win1 = Titanium.UI.createWindow({ backgroundColor: 'white', title: 'Facebook menu', left: 0, zIndex: 10 }); var touchStartX = 0; var touchStarted = false; win1.addEventListener('touchstart',function(e) { touchStarted = true; touchStartX = e.x; }); win1.addEventListener('touchend',function(e) { touchStarted = false; if(touchStartX - e.x > 0) { win1.animate(animateRight); } else { win1.animate(animateLeft); } }); leftMenu.addEventListener('touchend', function(e) { alert("dafuq?"); }); win1.open();Does anyone have this as well?
Your Answer
Think you can help? Login to answer this question!