完整内容,请查看:http://www.zhdoc.net/android/reference/android/widget/OverScroller.html
OverScroller
public class OverScroller
extends Object
java.lang.Object | |
↳ | android.widget.OverScroller |
This class encapsulates scrolling with the ability to overshoot the bounds of a scrolling operation. This class is a drop-in replacement for Scroller
in most cases.
这个类封装了可以超出滚动范围的滚动操作的能力。大多数情况下,这个类可以替代Scroller
。
摘要
Public构造方法 | |
---|---|
OverScroller(Context context) Creates an OverScroller with a viscous fluid scroll interpolator and flywheel. | |
OverScroller(Context context, Interpolator interpolator) Creates an OverScroller with flywheel enabled. | |
OverScroller(Context context, Interpolator interpolator, float bounceCoefficientX, float bounceCoefficientY) This constructor was deprecated in API level O. Use | |
OverScroller(Context context, Interpolator interpolator, float bounceCoefficientX, float bounceCoefficientY, boolean flywheel) This constructor was deprecated in API level O. Use |
Public方法 | |
---|---|
void | abortAnimation() Stops the animation. |
boolean | computeScrollOffset() Call this when you want to know the new location. |
void | fling(int startX, int startY, int velocityX, int velocityY, int minX, int maxX, int minY, int maxY) |
void | fling(int startX, int startY, int velocityX, int velocityY, int minX, int maxX, int minY, int maxY, int overX, int overY) Start scrolling based on a fling gesture. |