Hi,
The UIElements ScrollView has a few issues when operated with touch:
Issue #1: Elasticity ignores ScrollView mode.
Regardless of whether a ScrollView is only Horizontal or Vertical, in elastic dragging mode, you can pull in all directions, including horizontally in a vertical scroll view, basically pulling the scroll view off the rails.
Issue #2: Flick velocity is calculated incorrectly
Flick velocity is calculated incorrectly. Try to scroll up or down without letting go, wait 2 seconds, and then let go. The scroller suddenly flies off. The scroller isn’t actually calculating a velocity (distance over time), it’s only measuring the delta between the last two events, even if there are 10 seconds between them. The correct behavior would be to take the time between the two events into account to calculate an actual velocity. The scroller should also do nothing if the time between the last two deltas is more than a second, because this is likely not intended as a scroll, but a user changing their mind about scrolling at all. Currently, a decision to not scroll results in a scroll.
Issue #3: Scroll animation frame rate
Scroll animation has a different framerate than actual scrolling. In an app that runs that 60 fps per second, you’ll have the full frame rate while the finger is on the scroller, but the flicking frame rate immediately drops to 30 fps when you flick and let go. I think the timer that’s running the scroller animation is only being sampled at 30 fps.
Issue #4: Deceleration curve is extremely non-linear
The deceleration curve is based on multiplying a number with the speed, so 0 means immediately stopping, and 1 means going forever. However, the values in between don’t result in smooth deceleration, and the view hits a minimum speed you can’t get under regardless of deceleration value, unless you set it to zero and stop all scrolling. A value of 0.1, results in an abrupt deceleration to about 30% speed, and over the next 10 seconds, it only decelerates a little bit more. It feels like there’s a decimal error and the calculation is done in integers, because the curve quickly hits a floor of a minimum speed it can’t get under unless you disable flicking completely.
Also, multiplication isn’t a great way to decelerate, because it has an extremely long tail, and mathematically goes on literally forever (at a forceful 0.3x rate, it still takes 8 seconds to stop). You should consider subtracting a value from the speed instead of multiplying the speed with something. This creates a much more natural deceleration. The current curve is extremely exponential.
Issue #5: Elasticity is hard-coded when dragging
The current elasticity value only affects how a scroller hitting the end during a scroll is handled. It’s completely ignored when you drag over the edges. Please see how Apple does this. They apportion about 20% of the pointer movement to dragging of the view, indicating a sluggishness. This value is hard-coded in UIElements, and is close to 100%, which does not feel like any other elasticity implementation.