public class PlatformVelocityTracker extends Object implements VelocityTrackerInterface
VelocityTrackerInterface
using the platform-standard
VelocityTracker
.Constructor and Description |
---|
PlatformVelocityTracker() |
Modifier and Type | Method and Description |
---|---|
void |
addMovement(MotionEvent event) |
void |
computeCurrentVelocity(int units) |
float |
getXVelocity() |
float |
getYVelocity() |
static PlatformVelocityTracker |
obtain() |
void |
recycle() |
void |
setTracker(VelocityTracker tracker) |
public static PlatformVelocityTracker obtain()
public void setTracker(VelocityTracker tracker)
public void addMovement(MotionEvent event)
addMovement
in interface VelocityTrackerInterface
public void computeCurrentVelocity(int units)
computeCurrentVelocity
in interface VelocityTrackerInterface
public float getXVelocity()
getXVelocity
in interface VelocityTrackerInterface
public float getYVelocity()
getYVelocity
in interface VelocityTrackerInterface
public void recycle()
recycle
in interface VelocityTrackerInterface