FrameLayout
にImageView
が1つあり、回転アニメーションが適用されています。ただし、アニメーションは有効ではありません。FrameLayoutのImageViewにアニメーションを回転させても効果がありません
(res/anim
にあります)、アニメーションリソースファイルanim_blog.xml:Activity
で
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/linear_interpolator" >
<rotate
android:fromDegrees="0.0"
android:toDegrees="360.0"
android:pivotX="50%p"
android:pivotY="50%p"
android:repeatCount="infinite"
android:duration="1200" />
</set>
コードは以下の通りである:
Animation rotateAnim = AnimationUtils.loadAnimation(mCtx, R.anim.anim_blog);
rotateAnim.setDuration(Integer.MAX_VALUE);
mProgressIV.startAnimation(rotateAnim);
xmlを追加し、このコードスニペットをどこに書いていますか? – KDeogharkar
コードは、アクティビティのonResume()メソッドで記述されます。 –