Android7.0中文文档(API)-- OverScroller

完整内容,请查看: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.
创建一个使用ViscousFluidInterpolator(粘性流体插值器)和支持连续滑动的OverScroller。

OverScroller(Context context, Interpolator interpolator)

Creates an OverScroller with flywheel enabled.
创建一个支持连续滑动的OverScroller。

OverScroller(Context context, Interpolator interpolator, float bounceCoefficientX, float bounceCoefficientY)

This constructor was deprecated in API level O. Use OverScroller(Context, Interpolator) instead.
此构造方法在API level O版本中被取消。用OverScroller(Context, Interpolator)来替代。

OverScroller(Context context, Interpolator interpolator, float bounceCoefficientX, float bounceCoefficientY, boolean flywheel)

This constructor was deprecated in API level O. Use OverScroller(Context, Interpolator) instead.
此构造方法在API level O版本中被取消。用OverScroller(Context, Interpolator)来替代。

Public方法

voidabortAnimation()

Stops the animation.
停止动画。

booleancomputeScrollOffset()

Call this when you want to know the new location.
当你想知道新的位置时,调用此方法。

voidfling(int startX, int startY, int velocityX, int velocityY, int minX, int maxX, int minY, int maxY)
voidfling(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.
基于一个fling手势操作,开始滚动。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值