Take the 2-minute tour ×
User Experience Stack Exchange is a question and answer site for user experience researchers and experts. It's 100% free, no registration required.

I am implementing a list view on a touch screen.

I want to implement iPhone-like behavior, where you can scroll through the list by dragging any part of the list with your finger.

The hard part is the inertia. When you let go with your finger, the list must continue to scroll in the same direction. It must initially scroll at the same velocity, but decelerate to a resting state, as if it was slowing down due to friction. I guess the effect should be like sliding a playing card on a polished surface.

Given that I want this to be close to real-world physical behavior, what should be the formula for deceleration (the points per second per second)?

Is deceleration to be a constant, or will this be some more complex formula, taking as parameters the initial velocity and duration?

(This might actually be more a physics question than a UI question).

share|improve this question
    
I read a very good article bout this years ago, I can't find it back. The acceleration is not constant, it follows a curve. And it's very important to get it just right. If I remember correctly there is also a difference between acceleration and deceleration. I will try to find the article... it was on a blog. –  Bart Gijssens Nov 23 '11 at 7:30
    
What kind of dev.tool are you using? If you're doing JavaScript/HTML, then maybe you can use cubiq.org/iscroll-4. If not, you may learn something by looking at the implementation. –  Jørn E. Angeltveit Nov 23 '11 at 10:52
    
Even more JavaScript solutions: stackoverflow.com/questions/379917/… –  Jørn E. Angeltveit Nov 23 '11 at 11:00
    
@Jorn I'm actually using WPF. It provides a nice selection of easing functions for animations. –  Andrew Shepherd Nov 23 '11 at 21:30
add comment

1 Answer 1

up vote 3 down vote accepted

In physics this would be a case of 'dry friction'. The velocity should decrease linear in time. The linear factor is the coefficient of kinetic friction. I suppose you want to experiment with different values there.

If velocity is linear in time, then scroll position is quadratic.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.