public long t; } public FlingTracker() { } public void addMovement(MotionEvent event) { if (mEventBuf.size() == MAX_EVENTS) { mEventBuf.remove(); } mEventBuf.add(new MotionEventCopy(event.getX(), event.getY(), event.getEventTime())); } public void computeCurrentVelocity(long timebase) { if (FlingTracker.DEBUG) { Slog.v("FlingTracker", "computing velocities for " + mEventBuf.size() + " events"); } mVX = mVY = 0; MotionEventCopy last = null; int i = 0; int j = 0; float totalweight = 0f; float weight = 10f;