FileDocCategorySizeDatePackage
VelocityTrackerCompat.javaAPI DocAndroid 5.1 API3291Thu Mar 12 22:22:56 GMT 2015android.support.v4.view

VelocityTrackerCompat

public class VelocityTrackerCompat extends Object
Helper for accessing features in {@link VelocityTracker} introduced after API level 4 in a backwards compatible fashion.

Fields Summary
static final VelocityTrackerVersionImpl
IMPL
Select the correct implementation to use for the current platform.
Constructors Summary
Methods Summary
public static floatgetXVelocity(android.view.VelocityTracker tracker, int pointerId)
Call {@link VelocityTracker#getXVelocity(int)}. If running on a pre-{@link android.os.Build.VERSION_CODES#HONEYCOMB} device, returns {@link VelocityTracker#getXVelocity()}.

        if (android.os.Build.VERSION.SDK_INT >= 11) {
            IMPL = new HoneycombVelocityTrackerVersionImpl();
        } else {
            IMPL = new BaseVelocityTrackerVersionImpl();
        }
    
        return IMPL.getXVelocity(tracker, pointerId);
    
public static floatgetYVelocity(android.view.VelocityTracker tracker, int pointerId)
Call {@link VelocityTracker#getYVelocity(int)}. If running on a pre-{@link android.os.Build.VERSION_CODES#HONEYCOMB} device, returns {@link VelocityTracker#getYVelocity()}.

        return IMPL.getYVelocity(tracker, pointerId);