我想制作一个动画,以便在自身上旋转图像(通过x轴)。
我以前没有找到类似的东西,我已经尝试了一些技巧,比如:
public static void coinAnimation(final View v){
RotateAnimation anim = new RotateAnimation(0.0f, 360.0f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
anim.setInterpolator(new LinearInterpolator());
anim.setRepeatCount(Animation.INFINITE);
anim.setDuration(700);
v.startAnimation(anim);
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
v.setAnimation(null);
}
}, 2000);
}
慕码人2483693
BIG阳
翻阅古今
随时随地看视频慕课网APP
相关分类