方法一:
①参考:http://blog.csdn.net/jiangwei0910410003/article/details/16985999
②anim中主要参数设置:
android:interpolator="@android:anim/linear_interpolator"
android:repeatMode="restart"
android:repeatCount="infinite"
方法二:
①Animation设置setAnimationListener(new ReStartAnimationListener())
②ReStartAnimationListener()具体实现
/**
* 重复启动动画
*/
private class ReStartAnimationListener implements Animation.AnimationListener {
public void onAnimationEnd(Animation animation) {
// TODO Auto-generated method stub
animation.reset();
animation.setAnimationListener(new ReStartAnimationListener());
animation.start();
}
public void onAnimationRepeat(Animation animation) {
// TODO Auto-generated method stub
}
public void onAnimationStart(Animation animation) {
// TODO Auto-generated method stub
}
}