Code example for VelocityTracker

Methods: clear

0
			final int newPointerIndex = pointerIndex == 0 ? 1 : 0;
			mLastMotionX = mDownMotionX = ev.getX(newPointerIndex);
			mLastMotionY = ev.getY(newPointerIndex);
			mActivePointerId = ev.getPointerId(newPointerIndex);
			if (mVelocityTracker != null) {
				mVelocityTracker.clear();
			} 
		} 
	} 
 
	public int getRelativeChildPaddingLeft(int index) {
		View view = getChildAt(0) == null ? this : getChildAt(0);
 
		final int padding = getPaddingLeft() + getPaddingRight();
		final int offset = getPaddingLeft()
				+ (getMeasuredWidth() - padding - view.getMeasuredWidth()) / 2;
		// final int offset = getPaddingLeft() 
		// + (getMeasuredWidth() - padding - 
		// getScaledMeasuredWidth(getChildAt(0)) 
		// ) / 2;