在Android中我用RotateAnimation自定义了一个image,想让它循环转动,下面是我在res/anim/中的rotate_indefinitely.xml文件:
我用AndroidUtils.loadAnimation()把上述内容应用到ImageView时,一切运作正常:
spinner.startAnimation(
AnimationUtils.loadAnimation(activity, R.anim.rotate_indefinitely) );
但是,每当image转过360°到达最高点时,就会暂停片刻,然后才继续转动,无法连续的进行循环转动,我猜想,有可能是因为我错误的使用了android:iterpolator="@android:anim/accelerate_interpolator"(AccelerateInterpolator)这个内置程序,但我不太清楚该如何解决这种错误,保证image可以连续无停顿的旋转?
原问题:How to make a smooth image rotation in Android?
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号