Detecting up-down, left-right swipe on Android.

This probably is the simplest way to detect the exact swipe direction on Android. We split the screen into four quadrants and then use the MotionEvents to calculate the angle of swipe. The code is pretty self explanatory. To check out how to use this SwipeGestureDetector class with the relevant view, check out this post… Continue reading Detecting up-down, left-right swipe on Android.