我用旋轉旋轉動畫。而在一定程度上的圖像旋轉圖像在同一畫面中,我想用戶從以前的位置到下旋轉相同的圖像通過點擊一個button.but什麼發生旋轉。機器人如何使用兩次RotateAnimation
///inside oncreate
RotateAnimation rotate = new RotateAnimation(0, rotateSpeed,
Animation.RELATIVE_TO_SELF, 0.9f,
Animation.RELATIVE_TO_SELF, 0.5f);
rotate.setDuration(4000);
rotate.setFillAfter(true);
imv.setAnimation(rotate);
///inside button click
RotateAnimation rotate = new RotateAnimation(start, start+end,
Animation.RELATIVE_TO_SELF, 0.9f,
Animation.RELATIVE_TO_SELF, 0.5f);
rotate.setDuration(2000);
rotate.setFillAfter(true);
imv.setAnimation(rotate);
嗨,考慮顯示一些代碼(並添加更好的標籤!)。 –
按照這個http://stackoverflow.com/questions/3760381/rotating-image-animation-list-or-animated-rotate-android –