private int computeAxisDuration(int delta, int velocity, int motionRange) {
        if (delta == 0) {
            return 0;
        }

        final int width = mParentView.getWidth();
        final int halfWidth = width / 2;
        final float distanceRatio = Math.min(1f, (float) Math.abs(delta) / width);
        final float distance = halfWidth + halfWidth *
                distanceInfluenceForSnapDuration(distanceRatio);

        int duration;
        velocity = Math.abs(velocity);
        if (velocity > 0) {
            duration = 4 * Math.round(1000 * Math.abs(distance / velocity));
        } else {
            final float range = (float) Math.abs(delta) / motionRange;
            duration = (int) ((range + 1) * BASE_SETTLE_DURATION);
        }
        return Math.min(duration, MAX_SETTLE_DURATION);
    }
Settle the captured view at the given (left, top) position.

@param finalLeft Target left position for the captured view
@param finalTop Target top position for the captured view
@param xvel Horizontal velocity
@param yvel Vertical velocity
@return true if animation should continue through {@link #continueSettling(boolean)} calls
app/src/main/java/home/smart/fly/animations/widget/slidepanel/ViewDragHelper.java