我用旋转旋转动画。而在一定程度上的图像旋转图像在同一画面中,我想用户从以前的位置到下旋转相同的图像通过点击一个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 –