Code example for ObjectAnimator

Methods: isRunning

0
            return true; 
        } 
    } 
 
    private boolean isAnimationRunning() { 
        return Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB && mAutoCenterAnimator.isRunning();
    } 
 
    private static float vectorToScalarScroll(float dx, float dy, float x, float y) {
        // get the length of the vector 
        float l = (float) Math.sqrt(dx * dx + dy * dy);
 
        // decide if the scalar should be nagative or positive by finding 
        // the dot product of the vector perpendicular to (x, y) 
        float crossX = -y;
        float crossY = x;
 
        float dot = (crossX * dx + crossY * dy);
        float sign = Math.signum(dot);
 
        return l * sign;