I am working on a simple game. While user is touching the screen, increment some variable. While not, do nothing. I am Using surfaceView onTouchEvent, but it doesn't work because it is called only once. How can I accomplish such functionality?
@Override
public boolean onTouchEvent(MotionEvent event) {
vehicle.vel_y -=0.2f;
return super.onTouchEvent(event);
}