| void | [clear](()()
Reset the velocity tracker back to its initial state.
|
| void | [computeCurrentVelocity](()(int units, float maxVelocity)
Compute the current velocity based on the points that have been collected.
int unitis表示速率的基本时间单位。unitis值为 1的表示是,一毫秒时间单位内运动了多少个像素, unitis值为 1000表示一秒(1000毫秒)时间单位内运动了多少个像素
float Velocity表示速率的最大值
|
| void | [computeCurrentVelocity](()(int units)
Equivalent to invoking [computeCurrentVelocity(int, float)](()
with a maximum velocity of Float.MAX_VALUE.
|
| abstract T | [getNextPoolable](()() |
| float | [getXVelocity](()()
Retrieve the last computed X velocity.
|
| float | [getXVelocity](()(int id)
Retrieve the last computed X velocity.
|
| float | [getYVelocity](()(int id)
Retrieve the last computed Y velocity.
|
| float | [getYVelocity](()()
Retrieve the last computed Y velocity.
|
| abstract boolean | [isPooled](()() |
| static [VelocityTracker](() | [obtain](()()
Retrieve a new VelocityTracker object to watch the velocity of a motion.
|
| void | [recycle](()()
Return a VelocityTracker object back to be re-used by others.
|
| abstract void | [setNextPoolable](()(T element) |
| abstract void | [setPooled](()(boolean isPooled) |
示例:
private VelocityTracker mVelocityTracker;//生命变量