//顺时针旋转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();
网友评论