Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void | addMovement(MotionEventevent) Add a user's movement to the tracker. | ||||||||||
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. intunitis表示速率的基本时间单位。unitis值为1的表示是,一毫秒时间单位内运动了多少个像素, unitis值为1000表示一秒(1000毫秒)时间单位内运动了多少个像素 floatVelocity表示速率的最大值 | ||||||||||
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() | ||||||||||
staticVelocityTracker | 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) |
VelocityTracker简介
免责声明:文章转载自《VelocityTracker简介》仅用于学习参考。如对内容有疑问,请及时联系本站处理。
上篇wtl学习总结idou老师教你学istio 21:基于角色的访问控制下篇
宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=