Velocity of swipe open/close animations matches gesture speed. #192

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

@chrismiles
Contributor

Hi,

This patch improves the ViewDeck swipe open/close animations so that the velocity of the animation after swiping now more closely matches the user's swipe velocity.

i.e. if you swipe (or drag & release) quickly, the ViewDeck will open/close quickly. If you swipe/drag slowly, the ViewDeck will animate slowly. The animation speed is calculated to closely match the gesture velocity, with some min/max thresholds enforced to keep animation speeds sensible.

This animation behaviour is fairly subtle, but improves the quality of the ViewDeck. Compare old/new behaviour side-by-side to appreciate the difference. We've been running this in production for a few months now, it works nicely.

Let me know if you find any issues with it.

Cheers,
Chris

@chrismiles chrismiles Velocity of swipe open/close animations matches gesture speed.
Improved ViewDeck swipe open/close animations so that the velocity
of the animation after swiping now more closely matches the user's
swipe velocity.

Previously, the animation timings were constant and independent of
swipe velocity. Also, on swipe to close, the animation would stutter
at the beginning due to the ease-in timing.
b9a3045
@Inferis
Collaborator
Inferis commented Nov 30, 2012

Manually merged this here: 107b942

@Inferis Inferis closed this Nov 30, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment