Android ObjectAnimator旋转动画


//顺时针旋转45°
ObjectAnimator rotate = ObjectAnimator.ofFloat(iv_shai_float_menu, "rotation", 0f, 45f).setDuration(300);
        rotate.setInterpolator(new BounceInterpolator());
        rotate.start();

//逆时针旋转45°
ObjectAnimator rotate = ObjectAnimator.ofFloat(iv_shai_float_menu, "rotation", 45f, 0f).setDuration(300);
        rotate.setInterpolator(new BounceInterpolator());
        rotate.start();

你可能感兴趣的:(Android ObjectAnimator旋转动画)