Code example for VelocityTracker

Methods: clear

0
	 
	private void acquireVelocityTracker() { 
		if(tracker == null) {
            tracker = VelocityTracker.obtain();
        } else { 
            tracker.clear();
        } 
	} 
	 
	private void onTouch(MotionEvent event) {
		tracker.addMovement(event);
    	engine.event(new Input(event));
	} 
	 
	private void onTouchVelocity(MotionEvent event) {
		tracker.addMovement(event);
    	tracker.computeCurrentVelocity(1000);
    	engine.event(new Input(event, tracker.getXVelocity(), tracker.getYVelocity()));
	} 
	 
	private void releaseVelocityTracker() {