코드에 애니메이션이 있습니다. 하지만 Button을 클릭하면 ImageView가 원래 위치로 돌아갑니다 (애니메이션 재설정). 그 방법이 있습니다. 내 코드는 다음과 같습니다ImageView에서 지연된 애니메이션 삭제
private void returnToOriginalRotationState() {
RotateAnimation animation = new RotateAnimation(0.0f, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f);
animation.setInterpolator(new LinearInterpolator());
animation.setDuration((long) 2*1000);
animation.setFillAfter(true);
animation.setFillEnabled(true);
imgHeade.startAnimation() }
그것은뿐만 아니라 작동 그러나 animation.setDuration() (긴 2 * 1000);
작동하지 않음 !!!
android-android-animation
'imgHeade.setAnimation (animation);을 실행하고 애니메이션을 실행하십시오. – azizbekian
감사합니다. imgHeade.setAnimation (애니메이션)을 사용했습니다. 하지만 애니메이션이 실행되고 있지 않습니다. –