我需要使ImageView旋轉。爲此我使用了下面的代碼。ImageView中的動畫旋轉不平滑
RES /動畫/ rotator.xml:
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/linear_interpolator">
<rotate
android:duration="6000"
android:fromDegrees="0"
android:pivotX="50%"
android:pivotY="50%"
android:repeatCount="1"
android:toDegrees="359"></rotate>
</set>
Activity.class
final Animation myRotation = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.rotator);
imgSplashLogo.startAnimation(myRotation);
圖像沿着mycase旋轉。
但是在旋轉時卡住&不順利。 哪裏可能是我的代碼中的錯誤。
請提前檢查it.Thanks ...
http://stackoverflow.com/questions/2032304/android-imageview-animation –
參考http://stackoverflow.com/questions/12295578/rotate-image-on-center- not-going-smooth-monodroid – sasikumar