ankidroid/Anki-Android — pull request #672 by timrae (2014-12-17 16:08:00+00:00)
Title: Improve swipe detection

Improve the swipe detection algorithm:

* Remove the `sSwipeMaxOffPath` threshold. Instead assume that a swipe is either horizontal or vertical based on which direction the delta was greater. This is how it's done in native ViewPager and is much more natural.

* Use `ViewConfiguration.getScaledPagingTouchSlop()` and `getScaledMinimumFlingVelocity()` (as per ViewPager) for the swipe thresholds instead of manually trying to calculate them.

* Redefine the sensitivity so that it has a larger effect. 20% now increases thresholds by 5x, and 180% increases by 1.8x. The new thresholds are generally significantly lower than before so users probably shouldn't need a value much greater than 100%.

* Make the sensitivity be applied properly when a user changes preferences. Before they weren't being updated until AnkiDroid was force closed.