I am placing a popup window while the user scrolls the window using gesture detector, but it’s not updating to the correct position.
Can anybody tell me how to do this? Can anybody tell me how to update the position?
public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX,
float distanceY) {
if(e1.getX() > e2.getX())
{
window.update((int)e1.getX(), (int)e1.getY(), -1, -1);
}
else
{
window.update((int)e2.getX(), (int)e2.getY(), -1, -1);
}
Simply you need the second MotionEvent Coordinates