【发布时间】:2014-11-28 12:43:06
【问题描述】:
我在我的代码中使用的这行代码使我很兴奋,但最后速度变慢了。
mScroller.fling(getScrollX(), getScrollY(), velocityX, velocityY, 0, right - width, 0, bottom - height);
那么如何消除滚动条的减速/减速。
PS:我尝试将Interpolator 添加到Scroller,但仍然是同样的问题。
【问题讨论】:
我在我的代码中使用的这行代码使我很兴奋,但最后速度变慢了。
mScroller.fling(getScrollX(), getScrollY(), velocityX, velocityY, 0, right - width, 0, bottom - height);
那么如何消除滚动条的减速/减速。
PS:我尝试将Interpolator 添加到Scroller,但仍然是同样的问题。
【问题讨论】:
您是否尝试过使用 setFriction(0) 或可能使用 LinearInterpolator?
【讨论】:
我最终改用这个,效果很好:
mScroller.startScroll(getScrollX(), getScrollY(), dx, dy, duration);
【讨论】: