美文网首页
Android ObjectAnimator旋转动画

Android ObjectAnimator旋转动画

作者: OK2018 | 来源:发表于2017-12-15 16:51 被阅读0次

//顺时针旋转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旋转动画

      本文链接:https://www.haomeiwen.com/subject/imudwxtx.html