VelocityTrackerCompatpublic 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 | IMPLSelect the correct implementation to use for the current platform. |
Methods Summary |
---|
public static float | getXVelocity(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 float | getYVelocity(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);
|
|