Code example for ObjectAnimator

Methods: setDurationstartsetInterpolator

     * Anticipate the future animation by rearing back, away from the direction of travel 
    private void runPressAnim() { 
        downAnim = ObjectAnimator.ofFloat(this, "skewX", mOnLeft ? .5f : -.5f);
     * Finish the "anticipation" animation (skew the button back from the direction of 
     * travel), animate it to the other side of the screen, then un-skew the button 
     * with an Overshoot effect. 
    private void runClickAnim() { 
        // Anticipation 
        ObjectAnimator finishDownAnim = null;
        if (downAnim != null && downAnim.isRunning()) {
            // finish the skew animation quickly 
Connect your IDE to all the code out there  Get Codota for Java