Android Rotate Animation 무한 회전 각 바퀴 끝 정지 문제 해결 방법

1700 단어
ToDegrees와duration을 만 배로 늘리면 5시간 정도 돌려야 멈출 수 있다. 아주 작은 멈춤을 만 배로 약화시키는 것과 같다. 거의 무시할 수 있고 이 문제를 잘 해결했다. 구체적인 코드는 다음과 같다.
RotateAnimation rotateAnimation = new RotateAnimation(0,360,Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,0.5f);
rotateAnimation.setDuration(3000);
rotateAnimation.setRepeatCount(-1);
myImageView.startAnimation(rotateAnimation);

좋은 웹페이지 즐겨찾기