FriskyRotating.java 文件源码

java
阅读 30 收藏 0 点赞 0 评论 0

项目:FriskyImage 作者:
public void CustomOscillation(int startAngle, final int MaxAngleOfRotation,final int TimeToReachStartAngle,final int TimePeriodOfOscillation)
{
     runnable1 = new Runnable() {
        @Override
        public void run() {
            imageView.animate().rotationBy((-1)*MaxAngleOfRotation).withEndAction(runnable2).setDuration(TimePeriodOfOscillation).setInterpolator(new LinearInterpolator()).start();
        }
    };

    runnable2 = new Runnable() {
        @Override
        public void run() {
            imageView.animate().rotationBy(MaxAngleOfRotation).withEndAction(runnable1).setDuration(TimePeriodOfOscillation).setInterpolator(new LinearInterpolator()).start();
        }
    };

    imageView.animate().rotationBy(startAngle).withEndAction(runnable1).setDuration(TimeToReachStartAngle).setInterpolator(new LinearInterpolator()).start();

}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号