Fixes jumpiness in LinearSnapHelper when flinging less than one item
but more than half the current item.

This change modifies the logic in LinearSnapHelper which determines the
estimated target position for a fling.  Previously this code used
floor() or ceil(), depending on the direction of the fling, to select
the position to target.  If the distance of the fling was less than 1
then the target distance returned would be 0, meaning that we wouldn't
snap at all; but then if the natural amount of the fling was more than
half of the current item's height, we would snap to the next (or previous)
child once the fling settled, resulting in a jumpy stop-and-start scroll.
Instead we use round() in either direction so that we'll snap during the
fling if we're going to snap after it anyway.

Test: manual

Change-Id: Ic6b6d9a8477cd4cc1e06d70451ce590a8dfa0c9c
1 file changed